diff options
author | Araq <rumpf_a@web.de> | 2015-03-28 00:15:04 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-03-28 00:15:04 +0100 |
commit | 2b80d75aa298f490aedb8970b877f3edd7fd4bab (patch) | |
tree | 95022d7a26152ed2f1a28bf5c577643a612a4673 /web | |
parent | 46fb0e0bac2b5aa79e495bea11f48e33d372033c (diff) | |
download | Nim-2b80d75aa298f490aedb8970b877f3edd7fd4bab.tar.gz |
fixes #2420; negative indexing for slicing is obsolete (breaking change!)
Diffstat (limited to 'web')
-rw-r--r-- | web/news.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/web/news.txt b/web/news.txt index 3d60540ec..0b28c29bf 100644 --- a/web/news.txt +++ b/web/news.txt @@ -59,11 +59,12 @@ News echo x.T inc x - - **Negative indexing for slicing is deprecated and will be removed in the - next version of the language.** Instead of ``a[0.. -1]`` you can + - **Negative indexing for slicing does not work anymore!** Instead + of ``a[0.. -1]`` you can use ``a[0.. ^1]``. This also works with accessing a single element ``a[^1]``. Note that we cannot detect this reliably as it is determined at **runtime** whether negative indexing is used! + ``a[0.. -1]`` now produces the empty string/sequence. - The compiler now warns about code like ``foo +=1`` which uses inconsistent spacing around binary operators. Later versions of the language will parse these as unary operators instead so that ``echo $foo`` finally can do what |