After four months of development, Nim has presented the release of the system programming language Nim 2.2.12. Nim is a statically typed compiled programming language with Python-inspired syntax and Lisp-level metaprogramming capabilities. The language compiles to C, C++, and JavaScript, delivering C-level performance with the expressiveness of high-level languages. The project code is provided under the MIT license.
Nim features include a system of macros running on AST at compile time, support for generic programming with concepts, multiple dispatch, deterministic memory management with support for multiple strategies (ARC/ORC, refc, mark-and-sweep), built-in async/await support for asynchronous programming, and FFI for easy integration with C/C++/JavaScript. Nim is positioned as a systems language suitable for development from embedded systems to web servers, with an emphasis on efficiency, memory safety and ease of development.
The release includes 142 commits that fix bugs in the compiler and standard library. Fixes include:
- Fixed several crashes (SIGSEGV) in ARC/ORC related to the reuse of “{.dirty.}” templates and memory allocation for “seq”, as well as those that occurred when accessing elements of “case” objects after “move” in conjunction with “GC_fullCollect()” when using “refc”.
- Fixed a self-append bug in the “refc” runtime that would cause a crash on OpenBSD.
- Fixed a regression that caused the “–panics:on” flag to skip the “nimErr_” check after calling a closure, causing the check to false positive “OverflowDefect”.
- Fixed incorrect “deepCopy” semantics for non-copyable types and double