On Aug 30, 2011, at 11:00 AM, Andreas Rossberg wrote: > 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.
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. /be
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

