Skip to content

Changelog

Releases are named after minerals, in alphabetical order.

The first release. Agate forms in layers, slowly, inside volcanic rock. That seemed about right.

  • A lexer and parser for the grammar in the language reference
  • A type checker that resolves every name, call and implicit conversion into a bound tree, and an IL emitter that compiles that tree with no typing decisions of its own. Together they cover:
    • top-level methods and statements, classes, structs, protocols, mixins (include and extend), extension classes, inheritance and super, and namespaces
    • property, getter and setter, constructors, class methods and constants
    • positional, keyword, default, variadic and double-splat (**) parameters, out and ref arguments
    • structural typing: private methods with untyped parameters are compiled once for each set of argument types they’re called with
    • generics on classes and methods, with constraints and inference from arguments
    • nullable types, nil checks that narrow, &., || defaults and null_safety off
    • blocks, lambdas, closures, yield, and non-local return and break
    • arrays, hashes, ranges (including ^ indices), tuples, symbols, regular expressions and string interpolation
    • if, unless, ternaries, case/when (value, type and range matching, with exhaustiveness for enums), while, until, loop, for, break, next
    • raise, begin/rescue/else/ensure/retry and inline rescue
    • simple and complex enums, attributes (@[...]) and attribute classes
    • destructuring with deconstruct and deconstruct_keys
    • calling .NET types, including generic methods, indexers, delegates and Disposable#use
    • async and await
  • Anything the emitter can’t compile yet is reported as AM4001, and no assembly is written. It never guesses.
  • Every example in examples/ with an expected-output block runs as a test.
  • am check type-checks one or more files without building them
  • am build compiles a single file to a .NET assembly
  • am run compiles and runs a single file
  • Targets .NET 10
  • async methods run synchronously: await blocks until the task finishes.
  • Visibility isn’t enforced: calling a private method from outside its class compiles.
  • Including Enumerable[T] in an Amethyst type isn’t supported yet.
  • The compiler doesn’t yet apply its own attributes, such as AmethystName, to the code it emits.
  • am build and am run compile a single file. The project system isn’t implemented.