custom proto arg for Proxy.createFunction?

Brendan Eich brendan at mozilla.com
Wed Feb 23 15:29:46 PST 2011


On Feb 23, 2011, at 2:26 PM, David Herman wrote:

> Maciej has also suggested a Function.create(...) API for more lightweight creation of function subtypes.

Maciej proposal, first raised here:

https://mail.mozilla.org/pipermail/es-discuss/2009-March/008954.html

and recorded as part of a strawman here:

http://wiki.ecmascript.org/doku.php?id=strawman:name_property_of_functions

and only for the ability (beyond the reach of the Function constructor) to specify the intrinsic name of the created function object.

Adding an optional leading (not trailing) proto parameter is plausible if Function.create throws for an actual proto parameter that does not delegate to (the same Function) Function.prototype.

Oops, my name is by that strawman. I'd better make time for it soon.

/be


More information about the es-discuss mailing list