On 20 March 2012 11:14, Herby Vojčík <[email protected]> wrote:

> Andreas Rossberg wrote:
>
>> How about reusing 'new'?
>>
>> let obj  = do {
>>    let a;
>>    new {
>>       get a() {return a},
>>       set a()v) {a=v}
>>    }
>> }
>>
>
> Or let. We may allow let have object literals in list of assignments and
> return the last item. So "local var for obj literal" scenario could be:
>
> let obj  = do {
>    let a, {
>
>       get a() {return a},
>       set a(v) {a=v}
>    }
> }
>

I don't know, that seems to over-stretch the meaning of 'let'. It also
clashes syntactically with destructuring.

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

Reply via email to