This document defines the semantic blueprint of Multilingual 1.0.
Core 1.0 is the stable center of the language. Human-language frontends, interactive tools, AI systems, and execution targets all meet here.
The purpose of this document is to define what the language is, not merely how it is currently implemented.
Core 1.0 exists to give Multilingual:
- one precise semantic identity
- one shared foundation across human-language surfaces
- one language model for code, data, AI, concurrency, and interaction
- one portable representation that can move across execution environments
- one semantic basis for distributed and long-running programs
Detailed specifications for AI, multimodal, reactive UI, concurrency, and distribution layers may grow into companion documents, but Core 1.0 defines the semantic ground they stand on.
Every program in Multilingual 1.0 is understood in three layers:
- a human-language surface
- a shared semantic representation
- an execution form
The surface may vary. The execution target may vary. The semantics do not.
This is the central contract of the language.
Core 1.0 includes these foundational value families:
noneboolintfloatdecimalstringbyteslist<T>set<T>map<K, V>tuple<...>recordoption<T>result<T, E>rangefunctionstream<T>signal<T>
Core 1.0 is also designed to host these first-class capability-oriented values:
imageaudiovideodocumentembeddingpromptmodeltoolresourcefuture<T>channel<T>memory
These are not second-class library conventions. They belong to the language model.
Bindings are explicit about mutability.
letcreates an immutable bindingvarcreates a mutable binding
let name = "Amina"
var count = 0
Rebinding an immutable name is a semantic error.
Core 1.0 distinguishes between:
- mutation of a binding
- mutation of a value
That distinction should remain visible in the semantic representation and in diagnostics.
Structured data is a first-class part of the language.
Records are named-field values.
type User = {
id: int
name: string
email: option<string>
}
Tagged unions represent well-typed alternatives.
enum FetchState =
| Idle
| Loading
| Loaded { user: User }
| Failed { message: string }
Core 1.0 treats absence and failure as explicit data shapes:
option<T>expresses presence or absenceresult<T, E>expresses success or expected failure
These constructs are central to control flow, API design, and AI output handling.
Core 1.0 uses gradual typing with inference.
Its goals are:
- clarity without excessive ceremony
- strong structure for records, unions, and schemas
- useful inference for common code
- enough type information for tooling, optimization, and validation
Type information should be preserved in the semantic representation even when it is partly inferred.
Functions are first-class values and are declared with fn.
Core 1.0 supports:
- named functions
- anonymous functions
- closures
- typed parameters and return values
- async functions
- explicit capability annotations
fn greet(name: string) -> string:
"Hello, {name}!"
let double = fn(x: int): x * 2
Composition is a language-level concern, not a stylistic accident.
The |> operator threads a value through transformations.
let result = names
|> filter(fn(n): n.length > 3)
|> map(fn(n): n.upper())
|> join(", ")
This style should work equally well for data pipelines, event streams, and AI workflows.
The ? operator propagates failure from a result<T, E>.
fn parse_user(data: string) -> result<User, ParseError>:
let json = parse_json(data)?
let name = json["name"]?
ok(User(name: name))
Pattern matching is a central Core 1.0 construct.
It should support:
- literal patterns
- identifier capture
- wildcards
- tuple and list destructuring
- record destructuring
- tagged union cases
- optional guards
match state
case Loaded { user }:
show(user.name)
case Failed { message }:
show(message)
case _:
show("waiting")
Exhaustiveness checking for well-defined union types is part of the long-term language contract.
Core 1.0 supports:
- conditional execution
- loops
- matching
- early return
- async suspension
- stream iteration
Control flow should lower cleanly into multiple execution environments without giving up semantic clarity.
Asynchrony is a first-class part of the language.
Core 1.0 supports:
async fnawaitfor awaitstream<T>
stream<T> is the standard representation for incrementally produced values,
including event sources, generated tokens, and long-lived computations.
Concurrent and parallel execution are first-class semantic properties.
Core 1.0 provides:
par runs a fixed set of expressions simultaneously and collects their results
as a tuple. All branches must complete before execution continues.
let (summary, tags, sentiment) = par [
summarize(doc),
extract_tags(doc),
classify_sentiment(doc)
]
This is the primary idiom for running multiple AI operations in parallel.
spawn launches a task that runs concurrently and returns a future<T>. The
result is retrieved with await.
let task = spawn long_computation(input)
let result = await task
channel<T> is a typed conduit between concurrent tasks. Channels are
directional, buffered or unbounded, and composable with stream<T>.
let ch: channel<string> = channel()
spawn producer(ch)
for await msg in ch:
handle(msg)
All concurrent work should have a bounded scope. Tasks spawned within a block are joined before the block exits. This prevents leaking concurrent work across semantic boundaries and makes programs easier to reason about.
|> composes values sequentially. When fan-out is needed, par provides an
explicit parallel step that integrates naturally into pipeline style:
let result = doc
|> preprocess()
|> par [ summarize, translate, embed ]
|> store_all()
AI operations are language forms.
They are not wrappers around external APIs. They appear as explicit semantic constructs with visible capability requirements, typed inputs, and typed results.
Core operations include:
promptgeneratethinkstreamembedclassifyextractplan
let answer = prompt @claude-sonnet:
"Explain {topic} simply."
let invoice: Invoice = generate @gpt-4o:
"Extract invoice fields from: {text}"
let analysis = think @claude-sonnet:
"Step through the tradeoffs of: {proposal}"
let tokens: stream<string> = stream @claude-sonnet:
"Write a poem about {subject}"
let vec: vector<float> = embed @text-embedding-3-small: query
Agents and tools are first-class language concepts.
@tool(description: "Search a knowledge base")
fn search(query: string) -> list<string> uses net:
...
@agent(model: @claude-sonnet)
fn researcher(question: string) -> Report uses ai, net:
let sources = search(question)
let body = think @claude-sonnet:
"Synthesize: {sources}"
Report(content: body.conclusion)
@swarm declares a coordinated group of agents that share tools, memory, and
communication channels. Agents within a swarm can delegate tasks to each other
and communicate through typed channels.
@swarm(coordinator: @lead_agent)
let research_team = swarm {
@agent(model: @claude-sonnet) fn lead_agent(goal: string) -> Report uses ai, net: ...
@agent(model: @claude-sonnet) fn web_searcher(query: string) -> list<string> uses net: ...
@agent(model: @claude-sonnet) fn summarizer(docs: list<string>) -> string uses ai: ...
}
Agents in a swarm can run in parallel and pass results through the coordinator without manual orchestration code.
Core 1.0 includes semantic comparison as a language capability.
The ~= operator expresses approximate understanding rather than exact textual
equality.
match user_input ~=:
"yes": proceed()
"cancel": abort()
"help": show_help()
Semantic matching makes fuzzy classification and intent handling part of the language itself.
Programs should declare important external capabilities explicitly.
Initial capability families include:
aiuinetfstimeprocess
fn render(user: User) -> none uses ui
fn load_users() -> list<User> uses net
Capability information should remain visible in the semantic representation so that tooling, diagnostics, testing, and optimization can reason about it.
Reactivity is a first-class part of the language model.
Core forms should support:
- reactive bindings
- derived values
- event handlers
- live views
observe var count: int = 0
fn increment():
count = count + 1
on count.change:
render(view_counter(count))
The same reactive semantics should be able to power interfaces, event-driven systems, and live agent workflows.
Programs that delegate to AI models, run concurrently, or span distributed environments should be observable by design.
Core 1.0 provides observability primitives that attach to AI expressions:
trace expr— captures the model, inputs, and outputs of an AI operationcost expr— returns the token or compute cost of an AI operationexplain expr— requests a natural-language explanation of the result
let analysis = trace think @claude-sonnet:
"Evaluate the risks in: {proposal}"
let c = cost embed @text-embedding-3-small: query
Provenance values carry the full context of a decision: which model, which inputs, which output, and when. They should be storable, queryable, and renderable.
Programs should be able to declare where computation runs without writing manual coordination code.
Functions and agents can be annotated with placement hints:
@local— run on the user's device@edge— run in a nearby compute node@cloud— run in a remote cloud environment
@local
fn preprocess(img: image) -> image: ...
@cloud
@agent(model: @claude-sonnet)
fn analyze(img: image) -> Report uses ai: ...
The runtime honors placement annotations and manages data transfer. Semantics are preserved regardless of where execution happens.
Agents and programs that span sessions need persistent state. memory is a
named, typed, queryable store accessible across invocations.
let kb: memory<string> = memory("user-notes")
kb.store("preference", "prefers short answers")
let pref = kb.retrieve("preference")
Memory should support: named stores, typed values, time-scoped retrieval, and embedding-based semantic search over stored content.
Core 1.0 includes explicit module boundaries and package metadata.
Packages should be able to describe:
- dependencies
- targets
- capabilities
- exported interfaces
- versioning
This lets the language scale from small scripts to portable applications and shared ecosystems.
The shared semantic representation should model at least:
- bindings and mutability
- structured types
- union cases and patterns
optionandresult- functions and closures
- effects and capabilities
- AI-native constructs
- reactive constructs
- async and stream semantics
- concurrent constructs:
par,spawn,channel,future - multi-agent coordination:
@swarm, delegation, message passing - observability:
trace,cost,explainannotations - distribution: placement annotations,
memorystores - backend-neutral calls and data flow
This representation is the defining boundary of the language.
Every language construct in Core 1.0 should be part of a shared semantic vocabulary so that it can be expressed across human-language surfaces without changing meaning.
Localization belongs to the surface. Semantics belong to the core.
The highest-value implementation priorities for Core 1.0 are:
- typed semantic representation
letandvarfn,|>, and?- records and
enum optionandresult- stronger pattern matching
- explicit capabilities
- AI-native constructs
- semantic matching
- reactive bindings and event forms
- async and stream consistency
parandspawnfor structured concurrencychannel<T>andfuture<T>as principal values- multi-agent coordination via
@swarm - observability primitives:
trace,cost,explain - placement annotations and
memorystores