custom proto arg for Proxy.createFunction?
Tom Van Cutsem
tomvc.be at gmail.com
Fri Feb 25 06:11:00 PST 2011
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).
> I hope Tom & Mark can also weigh in on this when they get a chance.
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss