Dave Herman wrote:
> Reformed `with' depended on type annotations and structural type syntax,
> which are undergoing discussion. So I think reformed `with' is up in the
> air for now.
I find it odd that reformed |with| required such exact type
annotations, when nothing else does. It would seem that these
are very similar, from an early-binding viewpoint:
var {a, b, c} = fn();
x = a;
var obj = fn();
x = obj.a;
with (obj : {a, b, c})
{ x = a; // Desugars to obj.a
}
Equally it would seem that disambiguating syntax would allow
early binding, if it were enforced:
with (obj)
{ x = .a; // Desugars to obj.a
y = a; // From the lexical scope
}
--
Ingvar von Schoultz
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss