v0.9.4
Pre-releaseMajor changes:
There are two new operators e in e
and e in super
. They perform the same role as std.objectHasAll
, i.e. they allow you to discover whether a field exists, except that std.objectHasAll(super, e)
cannot be expressed since super
is not allowed in isolation. The semantics of e in super
are quite interesting because it returns false even if there is no super object.
There is a subtle change to the semantics of +:
and related field definitions. Previously if the super-object did not have the field f
then f +: e
was an error. Now, it succeeds in that case yielding f: e
. This extends recursively, so { } + { f+: { x +: { y: 1 } } }
yields { f: { x: { y: 1 } } }
, and in fact the left hand side { }
is not even needed. You can evaluate a mixin like { f+: { x +: { y: 1 } } }
without even applying it to anything. This is a backwards compatible change because it only affects the behavior of programs that used to fail.
Minor other changes in this release:
- Addition of std.prune
- Fix of uninitialized value (undefined behavior) in desugarer.