Simple Types
The simple types in Bach are Null, Bool, Num, and Str. The following
table shows some examples of programs that evaluate to a value of each type.
| Program | Type | Value | Error |
|---|---|---|---|
null | Null | null | |
false | Bool | false | |
true | Bool | true | |
42 | Num | 42 | |
0.3 | Num | 0.3 | |
"Hello world!" | Str | "Hello world!" |
The Null type has a single value, null.
The are two Bool values: true and false.
Num values are IEEE754 double-precision floating-point numbers.
Str values are sequences of bytes.