News items for previous commit
This commit is contained in:
parent
6edb07091d
commit
02243410fd
2 changed files with 10 additions and 4 deletions
|
|
@ -130,9 +130,9 @@ If a proc is annotated with the ``noinit`` pragma this refers to its implicit
|
||||||
|
|
||||||
|
|
||||||
The implicit initialization can be also prevented by the `requiresInit`:idx:
|
The implicit initialization can be also prevented by the `requiresInit`:idx:
|
||||||
type pragma. The compiler requires an explicit initialization then. However
|
type pragma. The compiler requires an explicit initialization for the object
|
||||||
it does a `control flow analysis`:idx: to prove the variable has been
|
and all of its fields. However it does a `control flow analysis`:idx: to prove
|
||||||
initialized and does not rely on syntactic properties:
|
the variable has been initialized and does not rely on syntactic properties:
|
||||||
|
|
||||||
.. code-block:: nim
|
.. code-block:: nim
|
||||||
type
|
type
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,13 @@ Changes affecting backwards compatibility
|
||||||
instead of signed integers.
|
instead of signed integers.
|
||||||
- In Nim identifiers en-dash (Unicode point U+2013) is not an alias for the
|
- In Nim identifiers en-dash (Unicode point U+2013) is not an alias for the
|
||||||
underscore anymore. Use underscores and fix your programming font instead.
|
underscore anymore. Use underscores and fix your programming font instead.
|
||||||
|
- When the ``requiresInit`` pragma is applied to a record type, future versions
|
||||||
|
of Nim will also require you to initialize all the fields of the type during
|
||||||
|
object construction. For now, only a warning will be produced.
|
||||||
|
- The Object construction syntax now performs a number of additional safety
|
||||||
|
checks. When fields within case objects are initialiazed, the compiler will
|
||||||
|
now demand that the respective discriminator field has a matching known
|
||||||
|
compile-time value.
|
||||||
|
|
||||||
Library Additions
|
Library Additions
|
||||||
-----------------
|
-----------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue