Skip to content

Ink 1.9: expressions in match clauses, exit() and env() syscalls

Latest
Compare
Choose a tag to compare
@thesephist thesephist released this 25 Apr 06:13
· 9 commits to master since this release

Ink 1.9 is a backwards-compatible update for the core language, and contains some minor non-breaking changes to the standard library APIs, mostly to improve performance.

Most notably, Ink 1.9 allows expressions in the match target position of a match clause. Previously only "atomic" expressions could be matched against in a list of choices, requiring syntax workarounds like

myValue :: {
    (Type.A) -> doThing()
    (Type.B) -> doThing()
    (1 + 2 + 3) -> doThing()
}

These expressions may now appear naked in these places:

myValue :: {
    Type.A -> doThing()
    Type.B -> doThing()
    1 + 2 + 3 -> doThing()
}

Language core

  • 45a8319 Add support for expressions as match clause targets
  • 5d7d5dd Improve number formatting in the language (Prefer formatting numbers in normal form if possible)

Language builtin interfaces

  • fce6f4e Add exit() builtin function
  • 12897e4 Unify copy across runtime error messages
  • def7185 Add env() builtin function

Standard library

  • 7d47f9f suite: When test suite fails, exit(1)