This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
Ergo 0.9.0
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 arraye1
at (integer) indexe2
. This return an option for type safety. (#561) - π Logging. You can now write
info(e1); e2
which indicate you want to print the value ofe1
then evaluatee2
. 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 onergoc
ergorun
orergotop
(#300)
Build π
Dependencies Upgrades
- Switch to latest Q*cert library (1.3.0)