Introduction to Nim

1.1 What is Nim?

A statically typed, compiled, systems programming language created by Andreas Rumpf (first release 2008, v1.0 in 2019, v2.0 in 2023).

Philosophy: efficiency, expressiveness, elegance, in that order of priority.

Syntax inspired by Python (indentation-based). Semantics influenced by Pascal/Modula, Ada, Lisp (macros), and C++.

Compiles to C, C++, Objective-C, and JavaScript, so it runs anywhere C runs: desktop, servers, embedded systems, browsers.

1.2 Key Features

C-level speed, zero-cost abstractions Python-like indentation, minimal punctuation Strong static typing With type inference Deterministic memory management

ARC/ORC (reference counting + cycle collection), destructors, move semantics

Templates, AST macros, compile-time execution C, C++, ObjC, JS Track exceptions and side effects Seamless C/C++ interop Uniform Function Call Syntax (UFCS) x.f(y) ≡ f(x, y)

myVar ≡ my_var ≡ myvar (first letter is case-sensitive)

1.3 Use Cases

CLI tools, system utilities, game development, web backends and frontends, scientific computing, embedded/IoT, blockchain (Status' Nimbus Ethereum client), compilers and DSLs, scripting (NimScript).