From 5d63ecb3a474a157f46019770c8288bb134e9aa9 Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 26 Mar 2015 02:12:26 +0100 Subject: implemented a[^1] notation --- web/news.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'web/news.txt') 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 ----------------- -- cgit 1.4.1-2-gfad0