0.6.12
·
1795 commits
to master
since this release
-
forloops over arrays are now converted to more efficient
index-based iteration (#2831). This can result in significant cycle
savings for tight loops, as well as slightly less memory usage. -
Add type union and intersection. The type expression
T and U
produces the greatest lower bound of types
TandU, that is,
the greatest type that is a subtype of both. Dually,T or U
produces the least upper bound of types
TandU, that is,
the smallest type that is a supertype of both.One use case of the former is "extending" an existing object type:
type Person = {name : Text; address : Text}; type Manager = Person and {underlings : [Person]};
Similarly, the latter can be used to "extend" a variant type:
type Workday = {#mon; #tue; #wed; #thu; #fri}; type Weekday = Workday or {#sat; #sun};