Commit graph

282 commits

Author SHA1 Message Date
Miran
c49b88163c
"for-loop macros" are no longer an experimental feature (#15288) 2020-09-08 14:25:25 +02:00
Clyybber
fb58066b61
Fix #5691 (#15158)
* Fix #5691
* Cleanup and thoughts
* Use scope approach
* Seperate defined/declared/declaredInScope magics
* Fix declaredInScope
* Update spec accordingly
2020-08-27 15:50:59 +02:00
Ico Doornekamp
2260ede247
Added array type definition to manual (#15173)
Co-authored-by: Ico Doornekamp <git@zevv.nl>
2020-08-10 14:01:47 +02:00
awr1
37253d660f
Minor improvements to typecast section of manual (#14896)
* Minor improvements to typecast section of manual

* Clarification to casting w/ concrete types

* Added less ambiguous language
2020-07-07 10:22:55 +02:00
Timothee Cour
dc5a40f3f3
{.deprecated: [existsFile: fileExists].} (#14735)
* {.deprecated: [existsFile: fileExists].}

* s/existsFile/fileExists/ except under deps

* workaround pending #14819

* fix test
2020-07-02 16:19:13 +02:00
Danil Yarantsev
7936768560
Fix some typos (#14843) 2020-06-28 19:17:18 +02:00
Sizhe Zhao
ad00d616e8
Warn about calling wrappers at compile time until #14049 is fixed. (#14828) 2020-06-27 16:51:48 +02:00
Andreas Rumpf
da29222f86
init checks and 'out' parameters (#14521)
* I don't care about observable stores
* enforce explicit initializations
* cleaner code for the stdlib
* stdlib: use explicit initializations
* make tests green
* algorithm.nim: set result explicitly
* remove out parameters and bring the PR into a mergable state
* updated the changelog
2020-06-23 10:53:57 +02:00
Juan Carlos
99c198625c
Deprecate unroll pragma, remove from documentation (#14705) 2020-06-19 15:08:45 +02:00
Juan Carlos
a056b4c3f1
Change 'Future Directions' to link memory management documentation (#14664) 2020-06-15 08:55:24 +02:00
Dominik Picheta
d3b25a2948
Clarify imported exceptions note in manual 2020-06-13 11:44:01 +01:00
Ico Doornekamp
0489e76da7
manual: removed subjective phrase from 'macros' section (#14536)
Removed phrase "However, this is no real restriction because
Nim's syntax is flexible enough anyway." from the manual - I find it
very subjective, and I sometimes *do* find myself restricted by Nim's
syntax when writing DSLs
2020-06-01 14:02:17 +02:00
Araq
177c7f96e9 spec: be explicit that NRVO will evolve further 2020-05-30 19:55:01 +02:00
Araq
984af3d64e document NVRO and exception handling 2020-05-30 19:50:11 +02:00
Huy Doan
00fa7a5747
Add thiscall calling convention, mostly for hooking purpose (#14466)
* Add thiscall calling convention, mostly for hooking purpose
* add changelog and documentation
2020-05-27 16:24:47 +02:00
Andreas Rumpf
79e85cb0b5
manual.rst: updates [backport] (#14445) 2020-05-25 12:16:32 +02:00
Danil Yarantsev
1450924b1e
Fix some typos in the manual [backport] (#14399) 2020-05-20 09:28:47 +02:00
Timothee Cour
2627e1e945
refs #14369 improve docs for importcpp exceptions (#14391)
* refs #14369 improve docs for importcpp exceptions

* address comments
2020-05-18 17:10:30 +01:00
cooldome
810039ec0b
docs:getCurrentException() and getCurrentExceptionMsg() are not available for imported exceptions (#14392) 2020-05-18 08:15:10 -07:00
Bung
c32e1378eb
docfix: fix wrong link in doc/manual.rst (#14367) 2020-05-16 03:04:39 -07:00
PMunch
9acbf99efb
Allow let to not have value when using importc (#14258)
* Allow let to not have value when using importc

This allows a let statement with the `{.importc.}` pragma to not be
initialised with a value. This allows us to declare C constants as Nim
lets without putting the value in the Nim code (which can lead to
errors, and requires us to go looking for the value). Fixes #14253

* Proper fix and documentation + changelog entry

* Improve testcase with one from timotheecour

* Add test to verify it working with macros
2020-05-12 20:28:18 +02:00
Avahe Kellenberger
55446c05a4
Added a reference to ternary operators. (#14309)
`if expressions` are similar to ternary operators in other languages.
In order to make this easier to find in the manual, I've added a
sentence about it.
2020-05-12 08:28:10 +02:00
Andreas Rumpf
03c146cd93
do not track 'raise Defect' in the .raises: [] clause anymore (#14298)
* do not track 'raise Defect' in the .raises: [] clause anymore

* --panics:on maps 'raise Defect' to an unrecoverable fatal error

* make tests green again

* update the documentation too
2020-05-11 16:25:56 +02:00
hlaaftana
de27910ab7
make from an operator (#14241) 2020-05-08 07:54:46 +02:00
hlaaftana
f50377986a
exp. features now in correct manual, closes #11932 (#14195) 2020-05-02 22:30:08 +02:00
hlaaftana
9b01c6cf48
discardable async procs are now an error (#14176)
* add discard warning in manual
2020-05-01 09:49:13 +02:00
Jacek Sieka
7d6cbf290a
Error -> Defect for defects (#13908)
* Error -> Defect for defects

The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.

With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
2020-04-28 19:56:01 +02:00
hlaaftana
b2141fc2a1
changed type() to typeof() in docs and error messages (#14084) 2020-04-24 09:22:12 +02:00
Rory O’Kane
b8b0e9b21d
docs: move not nil to the experimental page (#14027)
When I heard that this feature existed, and found the 2018 changelog entry that said `not nil` was made experimental (https://github.com/nim-lang/Nim/blob/devel/changelogs/changelog_0_19_0.md#changes-affecting-backwards-compatibility), I looked for `not nil` documentation in https://nim-lang.org/docs/manual_experimental.html. When I didn’t find it there, I initially assumed the feature had no documentation. This change moves the documentation to where readers will expect it.

As well as moving the text to another file, I added instructions for enabling the experimental feature and tweaked some wording.
2020-04-21 14:54:43 +02:00
hlaaftana
3fe3db3c0d
clarify tuples and objects in manual, fixes #12486 (#14044) 2020-04-21 11:21:12 +02:00
Clyybber
515b6d661e
Small typo (#13824) 2020-03-31 22:59:43 +02:00
Andreas Rumpf
9134bb9cfb
macros for proc types, macros for types (#13778)
* new minor feature: macros for proc types, to be documented

* Finished the implementation and added tests

* [skip ci] Describe the new custom pragmas in the manual and the changelog

Co-authored-by: Zahary Karadjov <zahary@gmail.com>
2020-03-31 21:14:05 +02:00
Rory O’Kane
84b378b94f
docs: say that nil can be used as a value (#13756)
and improve wording in other ways

Showing that `nil` can be assigned helps to warn readers that variables can be `nil` even after being assigned a value.
2020-03-25 19:42:34 +01:00
Andreas Rumpf
a6682de004
catchable defects (#13626)
* allow defects to be caught even for --exceptions:goto (WIP)
* implemented the new --panics:on|off switch; refs https://github.com/nim-lang/RFCs/issues/180
* new implementation for integer overflow checking
* produce a warning if a user-defined exception type inherits from Exception directly
* applied Timothee's suggestions; improved the documentation and replace the term 'checked runtime check' by 'panic'
* fixes #13627
* don't inherit from Exception directly
2020-03-12 23:44:33 +01:00
hlaaftana
34c16f5eca
fix #13409: Document as infix operator (#13570) 2020-03-04 07:50:36 +01:00
hlaaftana
525ab5a497
Document import/include outside of top level semantics (#13548) 2020-03-01 21:52:29 +01:00
Manav
479f4ca6a3
Fixed non-working examples in Manual: Exception Handling (#13424) 2020-02-20 15:16:19 +01:00
alaviss
d1f9f11245
manual: documents changes regarding dynlib (#13425)
* manual: documents changes regarding dynlib

Closes #13416

* manual: clean up sentence phrasing
2020-02-18 19:44:54 +01:00
Miran
038f47e7b9
fixes #3339 by documenting the limitations of case-statement (#13366) 2020-02-08 20:11:20 +01:00
Andreas Rumpf
fadbd8f70d
fixes #10665 (#13141) [backport] 2020-01-14 13:51:28 +01:00
Araq
2616a86d4b docs: tiny style improvements 2019-12-24 17:33:27 +01:00
Judd
e1d79d40f2 update documentation for closureScope and capture (#12886) 2019-12-21 08:06:32 +01:00
Andreas Rumpf
83a736a34a
ARC: cycle detector (#12823)
* first implementation of the =trace and =dispose hooks for the cycle collector
* a cycle collector for ARC: progress
* manual: the .acyclic pragma is a thing once again
* gcbench: adaptations for --gc:arc
* enable valgrind tests for the strutils tests
* testament: better valgrind support
* ARC refactoring: growable jumpstacks
* ARC cycle detector: non-recursive algorithm
* moved and renamed core/ files back to system/
* refactoring: --gc:arc vs --gc:orc since 'orc' is even more experimental and we want to ship --gc:arc soonish
2019-12-17 17:37:50 +01:00
Mark
73dd348ddd Manual update: custom exceptions (#12847) [backport]
Said that you can have custom exceptions and showed how to create and raise them.
2019-12-08 21:39:44 +00:00
Mark
46144a31ab deviated -> derived (#12845) [backport] 2019-12-08 20:14:54 +01:00
Brian Wignall
a7aeabb9d2 [backport] Fix spelling typos (#12755) 2019-11-28 08:30:55 +01:00
tauplus
8debf79837 fix typo in the manual (#12723) 2019-11-25 10:08:22 +01:00
tauplus
bfad0056ab Fix wrong section hierarchy in the manual (#12724) [backport] 2019-11-25 10:06:54 +01:00
Andreas Rumpf
64e8f050e1
implemented a new localPassc pragma (#12706) 2019-11-22 14:20:15 +01:00
Andreas Rumpf
c98e0e22ad
conversions to unsigned numbers are not checked anymore; implements /… (#12688) [backport]
* conversions to unsigned numbers are not checked anymore; implements / fixes https://github.com/nim-lang/RFCs/issues/175

* change the spec yet again to be less consistent but to make more sense; updated the changelog
2019-11-20 17:08:43 +01:00