Core language
Expressions and bindings
Read Musi through let, sequences, and case.
What
Expressions and bindings are the foundation of Musi reading. Start with a bound name, then read later expressions from the top of the file down.
let port := 8080;
port;Why
This model is predictable for Python/JS users: each line can introduce data, then later lines consume it.
How
Use let for names and ; for expression boundaries.
(
let base := 8000;
base + 80
);Case expressions are the branching form in this surface.
let Port := data {
| Configured : Int
| Default
};
let port : Port := .Configured(8080);
case port of (
| .Configured(port) => port
| .Default => 3000
);When
Use these patterns when you want readable scripts, data preparation, and deterministic command flow.
Analogy
Like a recipe card: bind each ingredient first, then assemble a final step.
Try it
Read the two snippets, then move to Functions and calls.
github.com/musi-lang/musi
musi-lang.com