A new version of the Nim system programming language has been released. It has a partial incompatibility with version 1.0, for example due to stronger type conversion. But in this case there is a flag -useVersion:1.0.
The main innovation is a new garbage collector, enabled by the --gc:arc option. The author of the language Andreas Rumpf is going to write a detailed article about the benefits of ARC, but for now he suggests reading with his FOSDEM talk, which shows the benchmark results.
- The compiler now supports the --asm option to make it easier to examine the produced assembler code.
- The align pragma can be used on object variables and fields, similar to alignas in C/C++.
- The =sink operator is now optional. The compiler can now use a combination of =destroy and copyMem to efficiently move objects.
- Conversions to unsigned integers are not checked at runtime. Details in https://github.com/nim-lang/RFCs/issues/175
- New syntax for lvalue: var b {.byaddr.} = expr, included via import std/decls
- The compiler supports a new --panics:on option that turns runtime errors such as IndexError or OverflowError into fatal errors that cannot be caught with a try. This can improve runtime efficiency and program size.
- The generated JS code only uses spaces instead of a hodgepodge of spaces and tabs.
- Added support for the .localPassc pragma to the compiler, with which you can handle special C(++) backend options for a C(++) file that is generated from the current Nim module.
- Nimpretty no longer accepts a negative argument for indentation, as this would break files.
- Added new macros (collect, dup, capture) connected via import sugar.
In addition, many changes have been added to the standard library and many bug fixes.
Source: linux.org.ru