Home›Blog›Larzscript
Larzscript

Larzscript Now Reads Like English: is, unless, for...to, say

2026-08-01 · Larzscript

Larzscript already reads like a sentence when money is involved - pay coffee from customer to shop, subscribe customer to pro. The newest release extends that feel to ordinary control flow and comparisons, so more of a program reads like English instead of symbols.

The new syntax

if age is 18 { ... }               # ==
if age is not 18 { ... }           # !=
if balance is at least $5 { ... }  # >=
if balance is at most $5 { ... }   # <=
if score is more than 0 { ... }    # >
if attempts is less than 3 { ... } # <

unless balance >= price {          # if not (...)
    throw "not enough funds"
}

for i from 1 to 10 { ... }         # counts up, 1..10 INCLUSIVE
for i from 10 to 1 { ... }         # auto-detects direction, counts down

say "hello, " + name               # print(...)
wait 2                             # sleep(2)

None of this is a new language bolted onto the old one - every natural form compiles down to the exact same thing the symbolic form does. is at least becomes a real >= node, unless becomes a real if not (...), for i from 1 to 10 becomes a real loop over a new range_to() builtin. Pick whichever reads better in a given line, or mix both - the interpreter, the --emit-c compiler, and the formatter all treat them as equivalent.

Mix and match, freely

wallet customer = $20.00
wallet shop
price coffee = $3.50

unless customer.balance is at least coffee {
    say "not enough for coffee"
} else {
    pay coffee from customer to shop
    say "enjoy your coffee!"
}

for i from 1 to 3 {
    print("refill", i, "ready")
}

The formatter keeps your spelling

A syntax that's supposed to read a certain way shouldn't get silently rewritten. larzscript fmt remembers whether you wrote unless or if not, is at least or >=, and prints it back exactly the way you wrote it - formatting only touches indentation and spacing, never your choice of words.

A real, useful loop shape

for i from 1 to 10 isn't just sugar for readability - it fixes a real rough edge. Python-style range(1, 10) is exclusive of 10, which trips people up constantly ("from 1 to 10" sounds like it should include 10). The new for...from...to form is inclusive of both ends and automatically figures out whether it's counting up or down, so for i from 10 to 1 just works without a manual negative step.

Try it now

The playground has a new "Natural language" example in the dropdown - no install needed, it runs the real interpreter (well, a faithful JavaScript port of it) right in your browser. If you'd rather run it locally, curl -fsSL https://raw.githubusercontent.com/larz-scripter/larzscript/main/install.sh | sh gets you the real native binary, current as of this release.

New here? Start with what Larzscript actually is or the step-by-step tutorial.

Ready to get started?

Try the Natural language example →

Explore the apps