Home /Modules/sleela-scripting/TYPE-SYSTEM.md

TYPE-SYSTEM.md

sleela-scripting/TYPE-SYSTEM.md · 27 line(s) · markdown

Sleela Script Turing 5 Type System

Turing 5 has a dynamic surface with strong runtime contracts at host boundaries.

Core values

null, boolean, integer, real, rational, complex, string, list, map, tuple, function, quantity, matrix, interval, result and opaque host handle.

Scientific metadata

Values may carry unit, dimension, precision, uncertainty, provenance, evidence status, timestamp and source identifier. Metadata is preserved through operations where mathematically meaningful.

Host boundary

Native SLeeLa objects are represented by opaque handles or immutable snapshots. Native pointers are never direct script values.

Errors

Type mismatch, dimensional mismatch, unknown state name, permission violation, queue-schema violation and expired context are distinct errors.

Constant values

A constant.get() result is a scientific value with a numeric value plus metadata such as unit, exactness, uncertainty, provenance, source, and registry revision. The runtime should preserve that metadata through mathematically meaningful operations.

Canonical namespaces are required for ambiguous symbols. For example, math.euler and physics.elementary_charge may both have an alias involving e, but they are different typed quantities and must not be conflated.