Motivation: Why Lale?
Why Lale exists — physical correctness, mathematical notation, and a simple, intuitive language.
Lale is an open-source programming language for engineering, science, and mathematics. It makes software easy to learn, read, and maintain — without giving up the performance, safety, and control of a systems language.
No forced semicolons or brace clutter — code stays close to the way you express an idea.
Units are part of the type system, so 5 <m> + 10 <s> is a compile-time error.
Greek letters, subscript digits (x₁), and superscript powers (v²) work directly.
Arrays start at 1, matching the conventions of mathematics and engineering.
No hidden type coercions and no silent narrowing — every conversion is visible.
Unicode is built in from the grammar up, so identifiers and text are first-class citizens.
/// Calculate kinetic energy with physical units
fn kinetic_energy(m as f64 in <kg>, v as f64 in <m/s>) returns f64 in <kg⋅m²/s²>
return 0.5 ⋅ m ⋅ v²
end fn
var mass as f64 in <kg> = 10.5
var velocity as f64 in <m/s> = 2.0
loop
var E_k = kinetic_energy(mass, velocity)
write "Kinetic Energy: {E_k} {#unit of E_k}" // Kinetic Energy: 21 kg⋅m²/s²
mass += 10 <kg>
end loop when mass > 30
Readable syntax, mathematical notation, and compiler-checked units in one program — the goal is to make the meaning of the code easier to see.
Why Lale exists — physical correctness, mathematical notation, and a simple, intuitive language.
A reflection on using AI agents to design and build the Lale compiler.
Compile-time physical-unit safety is real in Lale today — the embedded hardware target is still on the roadmap.
How Lale's grammar and documentation teach the general concepts of computing, not just one language.
Lale is under active development and approaching its first external beta. The language and reference interpreter are functional, and the compiler shares a common intermediate representation designed to support both interpretation and native compilation. It is not yet a stable 1.0.0 language.
Read the User Guide or the Architecture to learn more.