Nim 2.2.8 Programming Language Released

Introduced release of the system programming language Nim 2.2.8. 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 2.2.8 release came four months after version 2.2.6 and included 89 commits with bug fixes and improvements. The main improvement of the release is a significant increase in the stability of the standard memory allocator with active use of multithreading. According to the developers, the need for the “-d:useMalloc” workaround for multi-threaded code is a thing of the past. Users are asked to leave feedback.

Among the bugs fixed:

  • SIGBUS when iterating over a constant table due to premature destruction of temporary objects;
  • SIGSEGV with trailing iterators;
  • Incorrect C code generation when initializing .global inside a method;
  • error in finally processing in the closing iterator when try..except is present;
  • incorrect name mangling in C++ style when using –debuginfo;
  • slow operation of setLen when reducing the size of the sequence due to excessive
/Reports, release notes, official announcements.