Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

Tom Van Cutsem tomvc.be at gmail.com
Fri Jan 27 04:26:40 PST 2012


2012/1/23 Herby Vojčík <herby at mailbox.sk>

> But it gets harder with getters and setters... maybe if there was an API
> for simulating proper legacy foo[bar] and foo[bar]=baz, (Object.get,
> Object.set?) generic [] could be dropped without much of a loss.
>

We'll have Reflect.get and Reflect.set, see <
http://wiki.ecmascript.org/doku.php?id=harmony:reflect_api>.
(these are the methods referred to as Object.getProperty and
Object.setProperty that Allen referred to on the object model reformation
wiki page)

Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120127/4b801a30/attachment-0001.html>


More information about the es-discuss mailing list