Language rules and their costs
Luce asks you to write a choice when hiding it could change the program: number width, conversion, shared identity, recoverable failure, host access, or a worker boundary. Everything else should stay out of the way.
Representation changes are calls
Changing a concrete u16 to i64, or an integer to a float, uses the destination type's constructor. The call identifies the new representation at the source location and gives an out-of-range value a defined trap path. Arithmetic width therefore follows the written operands.
Conditions are Boolean
The expression controlling if, while, or a Boolean operator has type bool. Programs compare numbers, inspect optional presence, or ask a collection for its length explicitly. The branch condition then states the question that produces true or false.
Value and identity are different declarations
A struct copies its fields, while a class shares an ARC-managed identity. Class construction uses new and identity comparison uses is. Composition provides reuse, and interfaces describe shared behavior while each concrete type retains its own storage and destruction rules.
Three outcomes use three channels
T? represents presence or absence. T! lets a caller handle a recoverable error. A trap ends the run because an executed operation violated a language rule. Separate channels tell a caller which outcomes belong in ordinary control flow and which one terminates execution.
Ambiguous expressions require grouping
Familiar languages assign different trees to chained comparisons and to not directly before a comparison. Luce asks for parentheses or explicit Boolean composition in those positions. The written grouping then determines one syntax tree for the parser and the reader.
The world is a capability
Standard wrappers request filesystem, time, terminal, process, network, and graphics operations through an optional host table. The installed callbacks define the capabilities available to one run. Requesting an absent callback produces host_unavailable.
Concurrency copies at one visible boundary
spawn is the transfer point. Sendable value graphs are copied into a worker-owned heap. Classes, resources, functions, interfaces, and weak handles remain in their original runtime. Programs coordinate through transferred values and wait().
The trade-off table
| Language choice | Programmer action | Engineering effect |
|---|---|---|
| explicit numeric conversion | call a constructor when representation changes | the source fixes arithmetic width and the conversion trap point |
| final classes + interfaces | state composition and conformance | each class has one storage layout and destruction path |
| ARC + weak | choose weak edges for cyclic graphs | last release gives resources a deterministic cleanup point |
| isolated workers | copy permitted values at spawn and wait() | each Luce heap is accessed by one thread |
| host table | install callbacks for permitted services | each run has an inspectable capability set |