Let's replace <| with :: (was Breaking up the <|...)

Allen Wirfs-Brock allen at wirfs-brock.com
Sat Mar 17 09:26:04 PDT 2012

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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120317/c26511d3/attachment.html>

More information about the es-discuss mailing list