Proxies and function names: properties that are always non-configurable

Tom Van Cutsem tomvc.be at gmail.com
Mon Apr 16 09:53:57 PDT 2012


2012/4/13 Brandon Benvie <brandon at brandonbenvie.com>

> With other objects you can mostly manage the problem by creating a new
> instance using Object.create since nothing comes preinstalled. This
> obviously doesn't work for a functions, nor have I seen semantics on how
> inheritance for functions is support to work once we actually have the
> ability to do that. Has this been discussed anywhere yet? Have the
> semantics of how inheritance for functions is supposed to work in regards
> to the above properties?
>

There was a strawman proposal to add Function.create, inspired by
Object.create (not sure what the latest status of that is):
http://wiki.ecmascript.org/doku.php?id=strawman:name_property_of_functions

Inheritance among functions is also enabled by Allen's proto operator:
http://wiki.ecmascript.org/doku.php?id=harmony:proto_operator

Not sure what is unclear about the semantics, though: AFAICT, both just
entail creating regular Function instances whose [[prototype]] is not
Function.prototype. This doesn't create any new interactions as far as
proxies are concerned.

Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120416/16a01b3b/attachment.html>


More information about the es-discuss mailing list