with

Brendan Eich brendan at mozilla.com
Thu Nov 17 12:56:51 PST 2011


On Nov 17, 2011, at 6:39 AM, David Herman wrote:

> On Nov 17, 2011, at 6:26 AM, Mike Samuel wrote:
> 
>> 2011/11/17 David Herman <dherman at mozilla.com>:
>>>   obj with { foo: 12 } with { bar: 13 } with { baz: 17 }
>> 
>> Does the below fit your syntax and isn't it lexically ambiguous with
>> the old "with"?
>> 
>> obj
>> with ({ foo: 12 })
>> {}
> 
> This was discussed above; there's no ambiguity if the new language doesn't have with statements.

This would require migration through two steps. One to ES5 strict to get rid of the with above (which relies on ASI). The second to ES.next or whatever retasks 'with'.

Also, using 'with' around object literals makes me want functional record update. IIRC we've talked about that before.

/be



More information about the es-discuss mailing list