Function proxy length (Was: length property value for functions with parameter enhancements)
brendan at mozilla.com
Tue Aug 30 12:40:47 PDT 2011
On Aug 30, 2011, at 11:00 AM, Andreas Rossberg wrote:
> On 30 August 2011 18:41, David Bruant <david.bruant at labri.fr> 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.
Perhaps, but I think David has a stronger case for opting out of .prototype. Indeed self-hosting some of the ES1-5 builtins requires doing so, somehow. Not sure how V8 does this, but IIRC it does.
We've had various proposals for "methods not usable as constructors" in the past, and more recent things such as block-lambdas, that look like functions (callable, typeof says "function") but that lack .prototype properties.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss