On Nov 17, 2011, at 1:27 PM, David Herman wrote:

> On Nov 17, 2011, at 12:56 PM, Brendan Eich wrote:
> 
>> 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'.
> 
> I don't understand this-- that's already the case, since there's no 
> with-statement in ES6.

*What* is already the case?

If I have code of the kind Mike Samuel showed:

obj
with ({ foo: 12 })
{}

and I migrate directly into ES-whatever with 'with' as you propose (instead of 
<|), then I do not get an early error.


>> Also, using 'with' around object literals makes me want functional record 
>> update. IIRC we've talked about that before.
> 
> That's one of the things I like about `with` for this: prototype extension is 
> already a great mechanism for functional update on objects.

Prototype extension or delegation is not the same as FRU at all -- the 
delegating object can shadow proto-properties, the chaining is observable many 
ways (methods on the prototype, not only reflection APIs), there are two 
objects not one.

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to