Skip to content

Core Language Specification v0.1

Canonical source: spec/PROTOS_LANGUAGE_SPEC.md at locked revision e99b712ecf658a527b1fe82c8beba2c1286d8dc9. The source document’s own status and authority declarations apply; this website rendering does not upgrade, downgrade, or redefine them.

Language version: 0.1 Status: Draft Last updated: 2026-09-11 Normative I/O-domain semantics are defined in io/IO_CORE.md.

Normative semantic-domain ownership is modularized under semantics/: OBJECT_MODEL.md, EXECUTION_AND_CONTROL.md, CALLABLES.md, MODULES.md, ERRORS.md, VALUES_AND_COLLECTIONS.md, and MATCHING.md. Compatibility headings retained in this document are navigation only.

Normative concurrency-domain semantics are defined by the modular specifications under concurrency/. Non-normative unresolved concurrency design notes live in ../docs/design/CONCURRENCY_DESIGN.md and are not a source of observable behavior.

The language defined by this specification is named Protos.

The language is an object-oriented language based exclusively on prototypes and delegation.

There are no classes.

Every observable value is an object. This includes numbers, strings, booleans, closures, errors, futures, execution contexts, and null.

An implementation may internally represent some objects using immediate values, tagged pointers, specialized memory layouts, or other optimizations, provided that these optimizations are not observable through the language semantics.

The language has a uniform execution model. There is no fundamental semantic distinction between “global code”, “local variables”, and “properties”. Execution always takes place within contexts, and contexts are themselves objects.

The language favors objects and messages over keywords and special syntactic constructs.

Core v0.1 does not provide arbitrary custom symbolic binary operators. The accepted symbolic source surface and its precedence are fixed by PROTOS_GRAMMAR.md. Ordinary named messages/calls remain the extensibility mechanism for user-defined behavior, and Object.alias does not create new source-level operator spellings.

The primary normative owner of identifier lexing, Unicode/NFC requirements, reserved words, and contextual member-name syntax is PROTOS_GRAMMAR.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

Core v0.1 is dynamically typed.

Slots and parameters do not carry mandatory static type declarations. A slot may hold objects with different behavior over time, subject only to the normal object-state and assignment rules.

Message validity is determined dynamically by receiver behavior and delegation. The language does not introduce overload resolution by declared argument type.

Implementations and tools may infer types, specialize code, or expose optional analysis, but such information must not change observable language semantics.

The primary normative contract formerly contained here has moved to semantics/OBJECT_MODEL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/OBJECT_MODEL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/EXECUTION_AND_CONTROL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/MODULES.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/EXECUTION_AND_CONTROL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/EXECUTION_AND_CONTROL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/EXECUTION_AND_CONTROL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/EXECUTION_AND_CONTROL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/EXECUTION_AND_CONTROL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

Closure syntax and mandatory syntactic desugaring are owned by PROTOS_GRAMMAR.md. Closure value/capture/invocation semantics are owned by semantics/CALLABLES.md. This heading is a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/CALLABLES.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/CALLABLES.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/CALLABLES.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/CALLABLES.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/CALLABLES.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/EXECUTION_AND_CONTROL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

Trailing-closure syntax, attachment, and mandatory desugaring are owned by PROTOS_GRAMMAR.md; the resulting Closure obeys semantics/CALLABLES.md. This heading is a compatibility/navigation anchor and is not an independent normative owner.

The primary normative owner of whitespace, comments, NEWLINE tokens, separators, and continuation grammar is PROTOS_GRAMMAR.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/OBJECT_MODEL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The accepted symbolic source spellings, precedence, associativity, and lexical rejection rules are owned by PROTOS_GRAMMAR.md. Arbitrary custom symbolic binary operators are not part of Core v0.1. This heading is a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/OBJECT_MODEL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/OBJECT_MODEL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/OBJECT_MODEL.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The primary normative contract formerly contained here has moved to semantics/ERRORS.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

The normative contract formerly contained in this section has moved to concurrency/FUTURES_AND_TASKS.md. This heading remains as a compatibility/navigation anchor; it defines no independent duplicate contract.

The normative contract formerly contained in this section has moved to concurrency/FUTURES_AND_TASKS.md. This heading remains as a compatibility/navigation anchor; it defines no independent duplicate contract.

28. Future State, Resolution, Failure, and Adoption

Section titled “28. Future State, Resolution, Failure, and Adoption”

The normative contract formerly contained in this section has moved to concurrency/FUTURES_AND_TASKS.md. This heading remains as a compatibility/navigation anchor; it defines no independent duplicate contract.

The normative contract formerly contained in this section has moved to concurrency/FUTURES_AND_TASKS.md. This heading remains as a compatibility/navigation anchor; it defines no independent duplicate contract.

The normative contract formerly contained in this section has moved to concurrency/FUTURES_AND_TASKS.md. This heading remains as a compatibility/navigation anchor; it defines no independent duplicate contract.

The normative contract formerly contained in this section has moved to concurrency/FUTURES_AND_TASKS.md. This heading remains as a compatibility/navigation anchor; it defines no independent duplicate contract.

Expressing an operation through messages does not require its entire implementation to be written in the language.

For example, arithmetic messages may ultimately execute native arithmetic primitives.

Likewise:

closure.future()

may ultimately invoke a scheduler primitive.

A primitive is an implementation mechanism, not an exception to the object model.

The core does not require these as semantic primitives:

class
extends
new
var
let
const
function
async
await
for
undefined
try
catch
throw
finally

if and else remain ordinary identifiers in Core v0.1 and have no dedicated conditional syntax; if(condition) { ... } retains its ordinary call-plus-trailing-Closure grammar rather than being reserved for conditional reinterpretation. Canonical conditional execution is the ordinary Boolean protocol owned by semantics/VALUES_AND_COLLECTIONS.md and its surface grammar boundary is owned by PROTOS_GRAMMAR.md.

return and while remain independent possible future syntactic-sugar questions.

Everything is an object.
The language is dynamically typed.
There are no classes.
Object is the unique root object and has no delegation parent.
Every other object has exactly one delegation parent.
Every delegation chain terminates at Object.
Every object may serve as a delegation parent.
An object's delegation parent cannot change after creation.
Reads may delegate.
Writes never delegate.
: creates.
= modifies.
null is the only absence value.
A missing slot is not null; it is an error.
Execution contexts are objects; their standard prototype is `Context`.
Closures capture lexical contexts by reference.
Methods dynamically receive their receiver.
Inner closures capture that receiver.
Extracted methods remain bound to their receiver.
super preserves both the receiver and the lookup origin.
^ performs a non-local return.
Errors are objects and are signaled.
Futures are objects.
Asynchrony is a property of an execution,
not a separate category of function.
Objects may be closed or frozen.
Horizontal composition does not modify the delegation chain.
Top-level bindings are slots of a module execution context.
There is no special global-variable category.
Modules do not implicitly share mutable global state.
Actors share no mutable Protos state; any Protos object physically shared between Actors through the standard prelude is semantically immutable for the duration of that sharing.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative owner of Core Error signaling, dynamic handlers, matching, unwinding, and non-resumable failure semantics is semantics/ERRORS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/MODULES.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

Indexed-expression grammar and mandatory lowering are owned by PROTOS_GRAMMAR.md; standard collection at/atPut behavior is owned by semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility and navigation anchor; it is not a second normative owner.

Core defines no parallel Array operations; parallel Array algorithms are Standard Library functions of std:collections/Array. The Core placement boundary is owned by concurrency/PARALLEL_EXECUTION.md §71.6. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

Invocation Arguments, Defaults, Rest, and Spread

Section titled “Invocation Arguments, Defaults, Rest, and Spread”

The primary normative contract formerly contained here has moved to semantics/CALLABLES.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

Polymorphic Invocation and Object Construction

Section titled “Polymorphic Invocation and Object Construction”

The primary normative contract formerly contained here has moved to semantics/CALLABLES.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative owner of the context-sensitive grammar and mandatory lowering of ... is PROTOS_GRAMMAR.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/EXECUTION_AND_CONTROL.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to PROTOS_GRAMMAR.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

Prefix Operators and Protocol-Based Negation

Section titled “Prefix Operators and Protocol-Based Negation”

The primary normative owner of prefix-operator syntax and mandatory message-send lowering is PROTOS_GRAMMAR.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

String Indexing, Mutability, and Encoded Representations

Section titled “String Indexing, Mutability, and Encoded Representations”

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/VALUES_AND_COLLECTIONS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative owner of Future cancellation state, cancel(), cancellation boundaries, unwind effects, and cancelled-result observation is concurrency/FUTURES_AND_TASKS.md; standard Error construction/category semantics are owned by semantics/ERRORS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative owner of Future failure recording, observation, and dynamic-handler boundaries is concurrency/FUTURES_AND_TASKS.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative owner of the applicable Actor-local task, Actor-isolation, completion-visibility, and isolated-P boundary contracts is concurrency/FUTURES_AND_TASKS.md, concurrency/ACTORS.md, and concurrency/PARALLEL_EXECUTION.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.

The primary normative contract formerly contained here has moved to semantics/OBJECT_MODEL.md. This heading remains as a compatibility/navigation anchor and is not an independent normative owner.