2.8 KiB
v0.20.0 - XX/XX/2018
Changes affecting backwards compatibility
-
The
isLower,isUpperfamily of procs in strutils/unicode operating on strings have been deprecated since it was unclear what these do. Note that the much more useful procs that operator oncharorRuneare not affected. -
strutils.editDistancehas been deprecated, useeditdistance.editDistanceoreditdistance.editDistanceAsciiinstead. -
The OpenMP parallel iterator `
||` now supports any#pragma omp directivesand not just#pragma omp parallel for. See OpenMP documentation.The default annotation is
parallel for, if you used OpenMP without annotation the change is transparent, if you used annotations you will have to prefix your previous annotations withparallel for. -
The
uncheckedpragma was removed, instead usesystem.UncheckedArray. -
The undocumented
#? strongSpacesparsing mode has been removed. -
The
notoperator is now always a unary operator, this means that code likeassert not isFalse(3)compiles.
Breaking changes in the standard library
Breaking changes in the compiler
- The compiler now implements the "generic symbol prepass" for
whenstatements in generics, see bug #8603. This means that code like this does not compile anymore:
proc enumToString*(enums: openArray[enum]): string =
# typo: 'e' instead 'enums'
when e.low.ord >= 0 and e.high.ord < 256:
result = newString(enums.len)
else:
result = newString(enums.len * 2)
discard xis now illegal whenxis a function symbol.
Library additions
-
There is a new stdlib module
std/editdistanceas a replacement for the deprecatedstrutils.editDistance. -
There is a new stdlib module
std/wordwrapas a replacement for the deprecatedstrutils.wordwrap. -
Added
split,splitWhitespace,size,alignLeft,align,strip,repeatprocs and iterators tounicode.nim. -
Added
orforNimNodeinmacros. -
Added
system.typeoffor more control over howtypeexpressions can be deduced.
Library changes
-
The string output of
macros.lispReprproc has been tweaked slightly. ThedumpLispmacro in this module now outputs an indented proper Lisp, devoid of commas. -
In
strutilsempty strings now no longer matched as substrings anymore. -
Complex type is now generic and not a tuple anymore.
Language additions
- Vm suport for float32<->int32 and float64<->int64 casts was added.
Language changes
Tool changes
jsondocnow include amoduleDescriptionfield with the module description.jsondoc0shows comments as it's own objects as shown in the documentation.