On Jan 25, 10:02 am, Norris Boyd <[EMAIL PROTECTED]> wrote:
> On Jan 25, 12:34 am, Matthieu Riou <[EMAIL PROTECTED]> wrote:
<snip>
> > I've started implementing this in Rhino and it's actually not such a
> > big change. I'd be happy to contribute it (just need to implement the
> > lookup methods as well) but would like to know your opinion before.
> > Would you accept this modification to Rhino?
>
> Yes, thank you! Just create a bug and cc me on it. You can attach your
> patch.

Will do.

> > An extension to this (which I don't believe exists in SM) could be,
> > mostly for performance reasons, to support something like:
>
> > a.__defineGetter__('[]', function() { print "masked!"; });
>
> > This would override all index accessors, whatever the index. For large
> > arrays it would be much better as you only have a single function
> > definition.
>
> > So what do you think about this little proposal?
>
> Make sense to me in general, but I want to move in concert with
> SpiderMonkey. Also, I haven't been tracking ES4 and we need to be
> careful that we don't add features that won't be forward compatible.
> Perhaps you could post to the mozilla.dev.tech.js-engine list and see
> what people think there of the change?

Just posted the proposal there. I've also checked a bit ES4 and there
doesn't seem to be anything remotely similar (dynamic definition of
property accessors). There's even a bug filed by John Resig on the RI
about this (http://bugs.ecmascript.org/ticket/327).

Thanks!
Matthieu

>
>
> > Thanks,
> > Matthieu

_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to