diff options
author | Araq <rumpf_a@web.de> | 2015-03-26 02:12:26 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-03-26 02:12:38 +0100 |
commit | 5d63ecb3a474a157f46019770c8288bb134e9aa9 (patch) | |
tree | 828d7f2ec73cdb10875ae9172827fed627ac729c /web/news.txt | |
parent | 36b6bfaf78e3eeb5e6c7b17a2b55d904220c9fc6 (diff) | |
download | Nim-5d63ecb3a474a157f46019770c8288bb134e9aa9.tar.gz |
implemented a[^1] notation
Diffstat (limited to 'web/news.txt')
-rw-r--r-- | web/news.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/web/news.txt b/web/news.txt index 08a3cd6f5..1b8ddd3ce 100644 --- a/web/news.txt +++ b/web/news.txt @@ -42,6 +42,22 @@ News structure; for immediate macro parameters ``nkCall('addr', 'x')`` is produced instead of ``nkAddr('x')``. - ``concept`` is now a keyword and is used instead of ``generic``. + - The ``inc``, ``dec``, ``+=``, ``-=`` builtins now produces OverflowError + exceptions. This means code like the following: + + .. code-block:: nim + var x = low(T) + while x <= high(T): + echo x + inc x + + Needs to be replaced by something like this: + + .. code-block:: nim + var x = low(T).int + while x <= high(T).int: + echo x.T + inc x Language Additions @@ -84,6 +100,9 @@ News varOrConst(x) # "var" varOrConst(45) # "const" + - Array and seq indexing can now use the builtin ``^`` operator to access + things from backwards: ``a[^1]`` is like Python's ``a[-1]``. + Library additions ----------------- |