aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/src/language/index.md
blob: a4b402f8ba4aea1227bad8bae84c2a17b9299d8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Nix Language

The Nix language is

- *domain-specific*

  It only exists for the Nix package manager:
  to describe packages and configurations as well as their variants and compositions.
  It is not intended for general purpose use.

- *declarative*

  There is no notion of executing sequential steps.
  Dependencies between operations are established only through data.

- *pure*

  Values cannot change during computation.
  Functions always produce the same output if their input does not change.

- *functional*

  Functions are like any other value.
  Functions can be assigned to names, taken as arguments, or returned by functions.

- *lazy*

  Expressions are only evaluated when their value is needed.

- *dynamically typed*

  Type errors are only detected when expressions are evaluated.