On Mar 16, 2011, at 1:11 AM, Tom Van Cutsem wrote:
> Hi,
>
> I have no objections to the use cases you're proposing, but in the interest
> of keeping the Proxy.createFunction method somewhat simple, why isn't the
> following sufficient:
>
> // [[Construct]]-less functions:
> var f = Proxy.createFunction(handler, callTrap, function() { throw "can't
> construct"; });
>
> // [[Call]]-less functions:
> var f = Proxy.createFunction(handler, function() { throw "can't call"; },
> constructTrap);
+1 on leaving users of this case to write it out.
> Distinguishing between |null| and |undefined| to trigger one default behavior
> or the other feels a bit subtle to me. Are there precedents for this?
Not in ECMA-262.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss