On May 30, 2012, at 2:18 PM, Mark S. Miller wrote:

> 
> However, there might be some utility (at least for debugging) in having a 
> Function.prototype.isThisBound method.  It would return true for arrow 
> functions and functions created via Function.prototype.bind
> 
> I agree that such a predicate would be useful, but the useful predicate 
> should also give "true" for functions that don't mention "this". Thus, 
> "isThisBound" may not be the right name. What it really means is 'Can this 
> function sense the "this" binding with which it is called?" If we call it 
> "canSenseThis", then clearly we should also reverse the truth value.

I don't understand what this predicate is supposed to test for. What does it 
return for

    function f(x, y) {
        if (false) {
            console.log(this.foo);
        }
        return x * y;
    }

Can isBound be used to implement Function.prototype.halts? ;-P

Dave

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to