diff options
author | Alexander Ivanov <alehander42@gmail.com> | 2017-12-19 01:34:55 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-12-19 00:34:54 +0100 |
commit | a9ba02e8c90942ac3bc38c4fbab152968a8147dc (patch) | |
tree | 9ce420f1daec5efaf971e2547363d13969704abd /changelog.md | |
parent | a879973081e2c29d64e9fb9d8e539aa980533b10 (diff) | |
download | Nim-a9ba02e8c90942ac3bc38c4fbab152968a8147dc.tar.gz |
added asyncjs standard library module (#6841)
Diffstat (limited to 'changelog.md')
-rw-r--r-- | changelog.md | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/changelog.md b/changelog.md index b216b0f17..d519ecfcf 100644 --- a/changelog.md +++ b/changelog.md @@ -39,36 +39,37 @@ what to return if the environment variable does not exist. - Bodies of ``for`` loops now get their own scope: -.. code-block:: nim +```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 - +```nim t[ti] = if exp_negative: '-' else: '+'; inc(ti) +``` This now needs to be written as: -.. code-block:: nim - +```nim t[ti] = (if exp_negative: '-' else: '+'); inc(ti) +``` - To make Nim even more robust the system iterators ``..`` and ``countup`` now only accept a single generic type ``T``. This means the following code doesn't die with an "out of range" error anymore: -.. code-block:: nim - +```nim var b = 5.Natural var a = -5 for i in a..b: echo i +``` - ``formatFloat``/``formatBiggestFloat`` now support formatting floats with zero precision digits. The previous ``precision = 0`` behavior (default formatting) @@ -139,3 +140,6 @@ This now needs to be written as: - For string formatting / interpolation a new module called [strformat](https://nim-lang.org/docs/strformat.html) has been added to the stdlib. +- codegenDecl pragma now works for the JavaScript backend. It returns an empty string for + function return type placeholders. +- Asynchronous programming for the JavaScript backend using the `asyncjs` module. |