On Mar 17, 2012, at 9:15 AM, Brendan Eich wrote:
> Allen Wirfs-Brock wrote:
>> I not recall why we haven't seriously considered :: as an alternative to <|.
>> It certainly eliminates all the typography issues.
>
> Because we had agreed to reserve :: for guards:
>
> http://wiki.ecmascript.org/doku.php?id=strawman:guards
Yes, that's it...
It seems a shame as it would be such a good solution to this immediate problem
and there may be other alternatives for guards if we ever actually have them.
Also, I'm not sure that this usage would actually preclude :: also being used
by guards . :: as "prototype for" is a binary operator. "::" as a guard
designator is a suffix on a binding form. It isn't clear that there would be
any syntactic ambiguities in those two contexts.
let foo::bar=p::{};
Might be cognitively confusing but I don't think it would have any parsing
issue. It actually doesn't even look that confusing.
Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss