On Mar 17, 2012, at 11:39 AM, Allen Wirfs-Brock <[email protected]> wrote:

> 
> On Mar 17, 2012, at 2:03 AM, Russell Leggett wrote:
> 
>> ...
>>     //using : instead of <|, shorten Email.prototype to just Email
>>     let email = Email:"[email protected]";
> 
> Basically you are saying that : becomes an expression operator.  However, 
> that creates an ambiguity (and potential backwards compatibility issues) with 
> the use of : as a statement label designator:
> 
>     Email: "[email protected]";   //already valid ES meaning Email is 
> the label of this statement.

Yes, I thought about this potential ambiguity but thought it was no different 
than the potential ambiguity of block statements vs object liberals and 
therefore OK. 

>     Email: "[email protected]"; // label
>     let email = Email: "[email protected]"; // operator

Considering the statement form would be useless without assignment, I didn't 
think it would really cause confusion.

> 
> However,  unless I'm overlooking something,  :: would work just fine. 
> 
>   let email =  Email :: "ressell.leggett@gmail";
> 
> I not recall why we haven't seriously considered :: as an alternative to <|.  
> It certainly eliminates all the typography issues.
> 
> I updated my standing test case to use it: 
> https://github.com/allenwb/ESnext-experiments/blob/master/ST80collections-exp7.js
>  
> 
> It looks fine, perhaps not quite as visually distinctive as <| but it 
> certainly eliminates all the typography issues.
> 
> I think this it it!  We should replace the <| symbol with ::

Well, cheers to that, I still think it could be just :, but I'll drink to :: 
over <| any day.

> 
> Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to