Introduction
DETLEF is a typed, embeddable scripting language. Its syntax consists of literals, identifiers, calls, and blocks. Variable declarations, arithmetic, comparisons, and control flow are provided through calls rather than keywords or operators.
declare(x, integer, 0)
while(less(x, 3), {
print(x)
set(x, add(x, 1))
})
This program uses the standard library, which the CLI installs before running a script. An embedding application decides which operations to provide.
The language chapters describe syntax, runtime types, evaluation, and lexical scope. The stdlib reference describes the operations available when the standard library is installed.
Functions and Controls
A Function receives values after its arguments have been evaluated from left
to right. A Control receives unevaluated expressions and decides which to
evaluate, in what order, and how often. This lets if select a branch and
while repeat a body without dedicated parser syntax.
Both use the same call syntax. See evaluation for argument evaluation, overload selection, block results, and errors.
Embedding and extensions
Use the C SDK to embed DETLEF in a native application or write packages for native and Wasm hosts. Use the JavaScript SDK to embed DETLEF in Node.js or a browser and load compiled Wasm packages.
The SDK guides cover setup and API details. The language chapters explain the evaluation rules, types, and scoping shared by all hosts.