[[Invoke]] and implicit method calls

Mark S. Miller erights at google.com
Mon Sep 23 19:19:50 PDT 2013


Ok, I've only been skimming the thread but I obviously missed something
crucial. How would

f.call(obj)

cause obj's handler to be invoked at all, much less be given access to f?
And why?



On Mon, Sep 23, 2013 at 7:14 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:

> Sorry, I meant obj's handler
>
>
> "Mark S. Miller" <erights at google.com> wrote:
>
> What does "f's handler" refer to? If obj is a proxy and f is not, then obj
> has a proxy and f does not.
>
>
> On Mon, Sep 23, 2013 at 6:32 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:
>
>>
>> On Sep 23, 2013, at 6:14 PM, Kevin Smith wrote:
>>
>> > Hi Allen,
>> >
>> > Your line of thinking has convinced me that `invoke` as it currently
>> stands doesn't really fly.  However, I have an issue with your proposal.
>>  Take this fragment:
>> >
>> >     (1) function f() { doSomethingWith(this); }
>> >     (2) f.call(obj);
>> >
>> > Presently, the expression at (2) grants the function `f` access to
>> `obj`.  If I understand correctly, under your proposal the expression at
>> (2), in the case where `obj` is a proxy, additionally grants `obj` access
>> to `f`.  Is that right?
>>
>> In the case where obj is a Proxy f.call(obj) would give f's handler
>> access to f.
>>
>> Allen
>>
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>
>
>
> --
>     Cheers,
>     --MarkM
>



-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130923/4bcd06ae/attachment.html>


More information about the es-discuss mailing list