On 30 August 2011 18:41, David Bruant <[email protected]> wrote:

> This would facilitate the author work when it comes to creating functions
> that look like functions without having to always include some
> initialization code for .length, .prototype and such.
> It will still be possible to opt-out of .length or .prototype if the author
> doesn't
>

I don't think it's worth introducing special cases in the semantics,
especially not for something like length. Proxy authors already have to do a
lot of similar work, e.g. to make all the standard Object.prototype and
Function.prototype methods available on proxies.

I think this problem is something that should be solved by the library, not
the proxy API itself. Maybe we can find some nice building blocks for
handlers that make available the basic functionality in a convenient and
extensible way?

Another interesting case btw (although outside the standard proper) is
__proto__...

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

Reply via email to