Decoupling [ ] and Property Access and the DOM (Was: Why not NodeList#forEach :\?)
allen at wirfs-brock.com
Tue Jun 19 10:45:58 PDT 2012
On Jun 19, 2012, at 10:34 AM, Erik Arvidsson wrote:
> On Tue, Jun 19, 2012 at 10:12 AM, Brendan Eich <brendan at mozilla.org> wrote:
>> How does Allen's strawman preclude these? You can have .foo and .bar by the
>> usual means, as properties (lazy if proxied). You can alias indexes to them
>> using @elementGet and @elementSet if those hooks are invoked for any
>> bracket-indexed access, whatever the type of the expression in brackets.
> With proxies, yes. But if you are already using proxies I don't see
> why you would use @elementGet and @elementSet?
There are various differences between @elementGet and @elementSet and proxy get/set handlers. One is that the index value isn't coerced to a string before being passed to @elementGet/@elementSet
More information about the es-discuss