Repository navigation
v0.1.1
midad 0.1.1. Read the breaking changes before upgrading from 0.1.0.
Breaking changes
/is real division.7 / 2is now 3.5, not 3, on every path. Integer division isidiv(a, b), which floors (idiv(-7, 2)is -4).midad checkwarns W008 at every/between two numbers.x /= 2on anumbervariable is now a type error.- Integer overflow is refused on the Cranelift backend. It used to wrap silently. It now stops with
integer overflow, like the interpreter and the C backend. Tight arithmetic loops are slower for it: a 300-million-iteration add, multiply and remainder loop went from 217 ms to 327 ms, and theheavyworkload by 4% (measured, see BENCHMARKS.md). - Runtime errors have one format. Compiled programs print one line,
midad runtime error: <message>, and exit with status 1. The C backend usedmdx: <message>and status 70; Cranelift could abort with a signal. The interpreter keeps its source-locatedR0001diagnostic. - Mixing a number and a float stays a compile error (E0230) and now says how to convert. Exponent literals such as
1e21stay unsupported and now say so clearly.
Also in this release
- Functions as arguments: a parameter typed
fntakes the name of a function (no closures). for x in xs.- Clearer diagnostics for
?:,for x of,for (x in)andfor i in 0..3. - Fixes: the interpreter, C and Cranelift now agree on overflow, string order, float text and float negation. In the C backend,
chars()failed to link andunwrap_oron an error returned the wrong value.int()of a huge float crashed Cranelift binaries.
Full details are in CHANGELOG.md. Archives for Linux (x86_64, arm64) and macOS (Apple silicon, Intel) are attached by the release workflow, each with a .sha256.