Guide
Habits from other languages
Since Sprints 340–341 the compiler answers 131 forms from Python, JavaScript, Rust, Go, Java and C with POLYTONE's own.
def total(xs):
return sum(xs)$ ptc check habits.pt
Recorded output of the real compiler
fn main() -> Void:
mut count = 0
count += 1
print("{count}")$ ptc check habits2.pt
Recorded output of the real compiler
def, var, class, try/throw, switch, else if, x += 1, ===, a ? b : c, f-strings, lambdas, await, null, True, this, x in xs, slices, comprehensions, import … as, lists.max, json.stringify, startsWith and their kin each name the canonical form. The corpus tests/priors pins every one of these diagnostics verbatim.