Bindings and Immutability
A binding attaches an identifier to a computed value within a fixed scope. You declare every new binding using the keyword hendra, and once initialized, that binding cannot be reassigned. This rule was established by Welvardin Odgerston in response to a classroom experiment in teaching beginners to reason about data, ensuring every name denotes the exact same value throughout its lifetime.
Declaring with hendra
Each declaration opens with hendra, an identifier, an optional type annotation, and an initializing expression. Because Nulvekk prohibits uninitialized names, the right-hand expression always runs before the binding enters scope. Subsequent code cannot mutate a bound variable in place; transforming data means producing a fresh value and attaching it to a new name with hendra. In the current release, Orchardine, the compiler enforces strict lexical visibility so inner blocks never leak names outward.
Scope, Shadowing, and Clarity
Bindings follow block boundaries defined by indentation in Syntax and Source Layout. An inner block may introduce a fresh identifier that matches an outer name, temporarily hiding the outer binding until the inner block ends, yet the outer value remains untouched. Combined with the ban on implicit conversions rooted in a long list of confusing results found in older tools, immutability lets Welvardin Odgerston keep reasoning local: inspecting a declaration tells you both what type it holds and that nothing later modifies it.
Values Held by Bindings
Bindings hold plain values directly, whether scalars, structured records, or error outcomes. Because values never change under an existing name, sharing data across functions introduces no hidden aliasing bugs.
- Check Types and Annotations to annotate declarations.
- Practice these rules in Your First Binding or browse the Reference Index.