Subject: CVS commit: pkgsrc/lang/nim
From: Ryo ONODERA
Date: 2018-10-01 14:50:42
Message id: 20181001125042.86A4AFBEE@cvs.NetBSD.org

Log Message:
Update to 0.19

Changelog:
What’s new in 0.19.0

The nil state for strings/seqs is gone. Instead the default value for these is \ 
"" / @[]. Use --nilseqs:on for a transition period. This eliminates a \ 
large class of bugs that used to plague the average Nim code out there, \ 
including Nim’s standard library.

Accessing the binary zero terminator in Nim’s native strings is now invalid. \ 
Internally a Nim string still has the trailing zero for zero-copy \ 
interoperability with cstring. Compile your code with the new switch \ 
--laxStrings:on if you need a transition period.

These changes to strings and seqs give us more flexibility in how they are \ 
implemented and indeed alternative implementations are in development.

experimental is now a pragma and a command line switch that can enable specific \ 
language extensions, it is not an all-or-nothing switch anymore. We think this \ 
leads to a more robust development process where it’s clearly documented which \ 
parts of Nim are bleeding edge and which parts can be relied upon.

Other notable language additions:

    Dot calls combined with explicit generic instantiations can now be written \ 
as x.y[:z] which is transformed into y[z](x) by the parser.
    func is now an alias for proc {.noSideEffect.}.

    Anonymous tuples with a single element can now be written as (1,) with a \ 
trailing comma.

    In order to make for loops and iterators more flexible to use Nim now \ 
supports so called “for-loop macros”. See the manual for more details. This \ 
feature enables a Python-like generic enumerate implementation.

    Case statements can now be rewritten via macros. See the manual for more \ 
information. This feature enables custom pattern matching.

    The command syntax now supports keyword arguments after the first comma.

    Thread-local variables can now be declared inside procs. This implies all \ 
the effects of the global pragma.

    Nim now supports the except clause in the export statement.
    Range float types, example range[0.0 .. Inf]. More details in language manual.

Breaking changes to be mindful of

    The default location of nimcache for the native code targets was changed. \ 
Read the compiler user guide for more information.
    Lots of deprecated symbols in the standard library that have been deprecated \ 
for quite some time now like system.expr or the old type aliases starting with a \ 
T or P prefix have been removed.
    The exception hierarchy was slightly reworked, SystemError was renamed to \ 
CatchableError and is the new base class for any exception that is guaranteed to \ 
be catchable. This change should have minimal impact on most existing Nim code.

Async improvements

The “closure iterators” that Nim’s async macro is based on has been \ 
rewritten from the ground up and so async works completely with exception \ 
handling. Finally it is possible to use await in a try statement!
Nimble 0.9.0

This release includes a brand new version of Nimble. The new version contains a \ 
breaking change which you should read up on if you own hybrid packages. There \ 
are also the usual bug fixes and this release contains a lot of them.

Files:
RevisionActionfile
1.5modifypkgsrc/lang/nim/Makefile
1.4modifypkgsrc/lang/nim/PLIST
1.4modifypkgsrc/lang/nim/distinfo