On Mar 17, 2012, at 9:14 AM, Russell Leggett wrote:

> 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.

consider the proposed do {} operator that has a lot of fans.

We have to account for what this will mean:

Email: (do {...break Email;...}, do { ...});

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

Reply via email to