diff options
Diffstat (limited to 'changelog.md')
-rw-r--r-- | changelog.md | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index eebd47fb8..7aa52ece2 100644 --- a/changelog.md +++ b/changelog.md @@ -39,5 +39,26 @@ - Added ``typetraits.$`` as an alias for ``typetraits.name``. - ``os.getEnv`` now takes an optional ``default`` parameter that tells ``getEnv`` what to return if the environment variable does not exist. -- Removed PDCurses wrapper from the stdlib and published it as a separate +- Removed PDCurses wrapper from the stdlib and published it as a separate Nimble package. +- Bodies of ``for`` loops now get their own scope: + +.. code-block:: nim + # now compiles: + for i in 0..4: + let i = i + 1 + echo i + +- The parsing rules of ``if`` expressions were changed so that multiple + statements are allowed in the branches. We found few code examples that + now fail because of this change, but here is one: + +.. code-block:: nim + + t[ti] = if exp_negative: '-' else: '+'; inc(ti) + +This now needs to be written as: + +.. code-block:: nim + + t[ti] = (if exp_negative: '-' else: '+'); inc(ti) |