news.txt updates; fixes bootstrapping

This commit is contained in:
Araq 2015-04-22 13:57:20 +02:00
commit d631958124
2 changed files with 8 additions and 2 deletions

View file

@ -3266,9 +3266,10 @@ template `..<`*(a, b: expr): expr =
## '..' and '<' is required. ## '..' and '<' is required.
a .. <b a .. <b
proc xlen*(x: string): int {.magic: "XLenStr", noSideEffect.} proc xlen*(x: string): int {.magic: "XLenStr", noSideEffect.} = discard
proc xlen*[T](x: seq[T]): int {.magic: "XLenSeq", noSideEffect.} proc xlen*[T](x: seq[T]): int {.magic: "XLenSeq", noSideEffect.} =
## returns the length of a sequence or a string without testing for 'nil'. ## returns the length of a sequence or a string without testing for 'nil'.
## This is an optimization that rarely makes sense. ## This is an optimization that rarely makes sense.
discard
{.pop.} #{.push warning[GcMem]: off.} {.pop.} #{.push warning[GcMem]: off.}

View file

@ -127,6 +127,7 @@ News
things from backwards: ``a[^1]`` is like Python's ``a[-1]``. things from backwards: ``a[^1]`` is like Python's ``a[-1]``.
- A first version of the specification and implementation of the overloading - A first version of the specification and implementation of the overloading
of the assignment operator has arrived! of the assignment operator has arrived!
- ``system.len`` for strings and sequences now returns 0 for nil.
Library additions Library additions
@ -137,6 +138,10 @@ News
with a ``newMultipartData`` proc. with a ``newMultipartData`` proc.
- Added `%*` operator for JSON. - Added `%*` operator for JSON.
- The compiler is now available as Nimble package for c2nim. - The compiler is now available as Nimble package for c2nim.
- Added ``..^`` and ``..<`` templates to system so that the rather annoying
space between ``.. <`` and ``.. ^`` is not necessary anymore.
- Added ``system.xlen`` for strings and sequences to get back the old ``len``
operation that doesn't check for ``nil`` for efficiency.
Bugfixes Bugfixes