Skip to content

Norm 0.3 ​

Norm 0.3 is the nullable-safety and algorithm-foundation release. This page defines the 0.3 delivery contract; the language specification defines the complete semantics.

Nullable types ​

  • Types are non-null by default and T? explicitly represents a nullable type.
  • null receives a type from a nullable expected type.
  • Nullable types are supported in fields, parameters, return types, locals, and nested generic arguments.
  • Generic substitution normalizes repeated nullability.
  • if, early return, &&, and || provide flow-sensitive narrowing for local variables.
  • ?. propagates null across member reads and method calls.
  • ?? evaluates a lazy fallback from left to right.
  • Guest null has an explicit runtime representation shared by JVM and Native Image execution.

Calls and control flow ​

  • Top-level functions, class methods, and built-in functions support overloads.
  • Overload resolution selects one target by parameter count, labels, types, and generic inference.
  • for condition { ... } re-evaluates a Boolean condition before every iteration.
  • Conditional and iterable loops have distinct Syntax, Bound IR, and execution nodes.
  • Both loop forms support break, continue, return, and execution cancellation checks.

Ranges and collections ​

  • range(start, end, step) supports ascending, descending, and strided end-exclusive integer ranges.
  • range(start, end) uses a step of one.
  • Range.size() uses the same direction and boundary rules as iteration.
  • Array<T> and List<T> provide last() and reversed().
  • List<T> provides removeLast().
  • Array.filled and List.filled use general type-member lookup and generic inference.
  • Map.get(key:) returns a nullable value while indexed reads continue to require an existing key.
  • Collection copying, reversal, and filling follow the existing value-transfer semantics.

Text and sorting ​

  • CodePoint.isAsciiDigit() and CodePoint.asciiDigitValue() provide explicit ASCII digit operations.
  • std.collections.sort provides stable natural ordering for Array and List values containing Integer, CodePoint, or String.
  • Sorting returns an independent collection and String ordering uses Unicode code points.

Tooling and executable specification ​

The CLI, SemanticModel, Bound IR, Truffle backend, and language server share the same nullable, overload, type-member, and loop bindings. Diagnostics, completion, signature help, hover, navigation, references, and rename cover the 0.3 syntax and cross-file public signatures.

Executable specifications cover flow joins and reassignment, safe-access evaluation order, nullable generics, overload ambiguity, conditional-loop control transfer, Range boundaries and integer overflow, errors for empty collections, element-copy semantics, Unicode digit boundaries, stable sorting, and the LeetCode 1–100 regression suite.

Norm 0.25