zeolite-lang v0.8.0.0 Release Notes
Release Date: 2020-08-07 // over 3 years ago-
Language
[breaking] Makes the semantics of
cleanup
more consistent:- [breaking] Disallows statements that modify
return
values withincleanup
blocks, i.e.,return
with values and assigning named returns. - [new] Allows
cleanup
to access named returns that are initialized within the correspondingin
statement. Previously, access required initialization before thein
statement. - [new] An explicit positional return (e.g.,
return 1, 2
) will assign the values to the respective named returns, if applicable. This will make the actual return values available withincleanup
.
@type get () -> (Int) get () (foo) { // foo is the name of the return variable cleanup { \ bar(foo) // foo has been initialized by the time this is called } in return 1 // 1 is assigned to foo here }
- [fix] Adds unwinding of
cleanup
blocks when used withbreak
andcontinue
, respecting loop boundaries. Previously,cleanup
was ignored.
- [breaking] Disallows statements that modify
[breaking] Skips compilation of unreachable statements. The target use-case is temporary changes to code that circumvent parts of a procedure, e.g., an early
return
for the purposes of debugging.[breaking] Marks statements following
break
andcontinue
as unreachable.
Compiler CLI
- [behavior] Adds a compiler warning for
public_deps
that are not required by public.0rp
sources within the same module, since they are potentially just cluttering the public namespace of the module.