The Nim Language

Nim (formerly known as "Nimrod") is a statically typed, imperative programming language that tries to give the programmer ultimate power without compromises on runtime efficiency. This means it focuses on compile-time mechanisms in all their various forms.

Beneath a nice infix/indentation based syntax with a powerful (AST based, hygienic) macro system lies a semantic model that supports a soft realtime GC on thread local heaps. Asynchronous message passing is used between threads, so no "stop the world" mechanism is necessary. An unsafe shared memory heap is also provided for the increased efficiency that results from that model.

Conventions used within this documentation

The documentation provided within this book follows several conventions. These are explained below.

  • Commands to be ran in a terminal - These will be prefixed with the $ symbol, which does not need to be entered into the terminal. Any commands that should be ran as an administrator will be prefixed with a # symbol instead.

    An example of a terminal command is shown below.

    $ nim -v
    

    Commands will often include their command line output. In this case, the output will be shown directly below the call to the program, which will look a little like the following:

    $ nim -v
    Nim Compiler Version 0.14.2 (2016-06-11) [MacOSX: amd64]
    Copyright (c) 2006-2016 by Andreas Rumpf
    
    git hash: abf4e204c2f1a8a6915a8d32c970b5ce64f58e10
    active boot switches: -d:release