Nim is a statically typed, compiled systems programming language created by Andreas Rumpf, first released publicly in 2008 and still developed by him and a large open-source community. Its design goal is stated on nim-lang.org as efficiency, expressiveness and elegance, in that order: the language borrows Python’s indentation-based readability and Ada and Modula’s type safety, then compiles the result to native machine code through C, C++ or JavaScript. Nim 2.4.0 is the current stable release. The compiler and its standard library are themselves written in Nim, and the whole toolchain is MIT licensed, which puts it among the more permissive options for a language you might build a product on.
--mm:arc, --mm:refc and --mm:none are available when a project needs different trade-offs.iterator plus yield compiles down to an inline loop, so custom traversal costs no more than a hand-written for.nimble install PACKAGE pulls from the nimble.directory index and builds it from source; atlas is the newer workspace-oriented alternative for multi-project setups.importc and header pragmas bind existing libraries directly, with no binding generator required, and Nim code can be exported for use from C.std/strutils, std/tables, std/json, std/net, std/asyncdispatch, std/os and std/parseopt cover most of what a command-line tool or service needs before any third-party package is installed.Nim is the option for people who like writing Python but need the result to be a fast, self-contained executable. Because the language has one syntax with several backends and a memory model you can change per project, the same codebase can start as a script, grow into a service and still be linked into a native binary without a rewrite — and the macro system means the awkward, repetitive parts of a domain can be turned into syntax rather than copy-pasted. The trade-off is a much smaller ecosystem than Rust, Go or Python: expect fewer ready-made libraries and be prepared to read the compiler’s own documentation, which is unusually good.
Prebuilt compilers for Linux (x86-64 and x86-32), macOS (Intel and Apple silicon) and Windows are published on nim-lang.org; choosenim and the distribution packages handle upgrades. Compiling and running a file is a single command:
nim c -r hello.nim — compile with default settings and run the result.nim c -d:release hello.nim — optimised build with runtime checks relaxed.nimble install PACKAGE — add a dependency and record it in the project’s .nimble file.As with any compiled language, gcc or clang must be installed on the host, because C is the default target.