dryLang is dynamically typed. Variables can hold any type, and the type is determined at runtime.
Numbers represent both integers and floating-point values. Internally, all numbers are stored as 64-bit floats.
dryLang uses comma (,) as the decimal separator — the dot (.) is reserved for comments.
| Syntax | Meaning |
|---|---|
89,5 | Float 89.5 (no space after comma) |
89, 5 | Two separate values (space after comma = separator) |
fn(a, b) | Two parameters (comma followed by space) |
Strings are sequences of characters enclosed in double or single quotes.
Both " and ' are equivalent — both support interpolation and escape sequences.
| Escape | Character |
|---|---|
\n | Newline |
\t | Tab |
\\ | Backslash |
\" | Double quote |
\' | Single quote |
| \0 | Null character |
Use ${} inside strings to embed expressions:
Raw strings are enclosed in backticks (`). No interpolation or escape processing occurs:
Raw strings are ideal for regex patterns and file paths.
dryLang uses single-character boolean values:
| Value | Meaning |
|---|---|
t | true |
f | false |
unknown is a special value representing an uninitialized or undetermined state.
| Value | Truthy? |
|---|---|
t | ✅ |
f | ❌ |
0 | ❌ |
"" (empty string) | ❌ |
[] (empty array) | ❌ |
{} (empty map) | ❌ |
unknown | ❌ |
| Any other number | ✅ |
| Any non-empty string | ✅ |
| Any non-empty collection | ✅ |
Use the get() built-in to check a value's type at runtime:
get() returns one of: "number", "string", "bool", "array", "map", "fn", "unknown".