Language basics and statements
Nim uses indentation for blocks. Prefer let for immutable bindings, var for mutable state, and const for compile-time constants.
Define procedures with proc:
Use if/elif/else, for, and while as expected. 1..5 includes the end and 0..<5 excludes it.
Model data with enum, object, and sequences:
type
Status = enum pending, running, completed
Article = object
title: string
tags: seq[string]
let article = Article(title: "Nim", tags: @["language", "native"])
Export a module symbol with * and import it elsewhere:
See the type and memory guide and official manual for the detailed model.