Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Ergo 0.9.0

Compare
Choose a tag to compare
@jeromesimeon jeromesimeon released this 30 Jun 14:26

This release is focused on overhauling error handling and improved error reporting.

But it also includes language and compiler changes: array index access, a new logging expression, support for compiler warnings and new built-in functions.

Note: While this release is backward compatible from a language perspective, it may require changes to application code which relies on the Ergo JavaScript API

Language

New expressions 🎁

  • πŸ”’ Array index. You can now write e1[e2] to access the value of array e1 at (integer) index e2. This return an option for type safety. (#561)
  • πŸ“ Logging. You can now write info(e1); e2 which indicate you want to print the value of e1 then evaluate e2. The semantic is defined as a no-op (so the compiler is free to optimise aggressively in some environments), but this can be useful when authoring template logic. This is an experimental feature, feedback is welcome (#121)

Built-in functions

  • πŸ“ New length function returns the length of a string (#615)

Compiler

Errors πŸ›

  • 🎢 Errors use a new type hierarchy consistent with Composer Concerto!
  • πŸ“ Better location information in type errors over built-in operators (#622)
  • 🌷 Underlining errors does not look strange when tab characters are present (#626)
  • 🌷Better type errors for missing fields (#629)

Warnings ⚠️

  • New support for compiler warnings. You can turn warnings on by using the --warnings flag on ergoc ergorun or ergotop (#300)

Build πŸ—

Dependencies Upgrades

  • Switch to latest Q*cert library (1.3.0)