fixes #2420; negative indexing for slicing is obsolete (breaking change!)
This commit is contained in:
parent
46fb0e0bac
commit
2b80d75aa2
8 changed files with 82 additions and 79 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue