Shipped
Human notation, everywhere
Qingchu uses words and math symbols — not programmer punctuation.
print, ask, when, define are
speech-like keywords; >, +, *, =
are plain math. A . ends a statement, like a sentence.
print Hello World .
speech-like
indentation blocks
Shipped
Typed bindings
Every binding has a type, visible at the point of use. A binding is
referenced as name_type — so name_string,
count_number, flag_boolean. The type is part of the name.
let name = Bob
name ts string
number
string
boolean
Shipped
Context markers
math and string drop the type suffix so code reads
naturally. Inside math, total means total_number;
inside string, name means name_string.
math let total = price * quantity .
math print total .
math
string
Shipped
Constants & reassignment
Mark a binding constant and it can't be reassigned. To change an
existing binding, use new — an explicit, readable reassignment.
let pi = 3.14
pi ts constant number
math new count = count + 1 .
constant
new
Shipped
Speech-like control flow
Branch with if / else, loop with when — loops read like
conditions ("when i < 3, print…"), and indentation opens and closes blocks.
math when i < 3
print Count: i .
new i = i + 1 .
if / else
when
Partial
Functions
Define functions with define … as … and return values with
calculate. Parsing is complete; execution is on the roadmap.
define double(x) as x * 2
x ts number
double ts number
define
calculate