custom proto arg for Proxy.createFunction?

Tom Van Cutsem tomvc.be at gmail.com
Fri Feb 25 06:11:00 PST 2011


Hi Dave,

I like your proposed extension.

IIRC, the main invariant that we wanted to uphold is that callable objects
are always instanceof Function, which continues to hold under your proposal.
Again, repeating what you said: even without this extension, function
proxies are already powerful enough to act as if they inherited from a
custom prototype P, except that they can never claim to be "instanceof P". I
don't see any reason for disallowing this if P inherits from
Function.prototype. Mark may remember more details though.

2011/2/24 Dave Herman <dherman at mozilla.com>

>
>
> David Bruant <bruant at enseirb-matmeca.fr> wrote:
>
> >Ok... hmm... well...
> >I misread your initial post. You wanted to enforce the condition on the
> >argument proto object, not the object returned by Proxy.createFunction.
>
> That's right.
>
> >That's what you're suggesting from the beginning if I understand well.
>
> Exactly. Sorry that was unclear.
>
> >> (I'm actually a fan of the 4th solution).
>
> Cool!
>
> I hope Tom & Mark can also weigh in on this when they get a chance.
>
> Dave
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110225/9504338f/attachment-0001.html>


More information about the es-discuss mailing list