mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
news.txt updates; fixes bootstrapping
This commit is contained in:
@@ -3266,9 +3266,10 @@ template `..<`*(a, b: expr): expr =
|
||||
## '..' and '<' is required.
|
||||
a .. <b
|
||||
|
||||
proc xlen*(x: string): int {.magic: "XLenStr", noSideEffect.}
|
||||
proc xlen*[T](x: seq[T]): int {.magic: "XLenSeq", noSideEffect.}
|
||||
proc xlen*(x: string): int {.magic: "XLenStr", noSideEffect.} = discard
|
||||
proc xlen*[T](x: seq[T]): int {.magic: "XLenSeq", noSideEffect.} =
|
||||
## returns the length of a sequence or a string without testing for 'nil'.
|
||||
## This is an optimization that rarely makes sense.
|
||||
discard
|
||||
|
||||
{.pop.} #{.push warning[GcMem]: off.}
|
||||
|
||||
@@ -127,6 +127,7 @@ News
|
||||
things from backwards: ``a[^1]`` is like Python's ``a[-1]``.
|
||||
- A first version of the specification and implementation of the overloading
|
||||
of the assignment operator has arrived!
|
||||
- ``system.len`` for strings and sequences now returns 0 for nil.
|
||||
|
||||
|
||||
Library additions
|
||||
@@ -137,6 +138,10 @@ News
|
||||
with a ``newMultipartData`` proc.
|
||||
- Added `%*` operator for JSON.
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user