Automatically binding extracted methods

Brian Di Palma offler at gmail.com
Fri Jun 14 13:26:21 PDT 2013


I suppose a special binding operator has already been discussed and discarded?

const functionBoundToclassInstance = classInstance->methodName

and everytime classInstance->methodName is called it gets returned the
same function
meaning references don't have to be stored for unsubscribing from listeners.


On Fri, Jun 14, 2013 at 7:57 PM, Brendan Eich <brendan at mozilla.com> wrote:
> Alex Russell wrote:
>>
>> This, incidentally, is the sort of way I'd hoped we'd slot in
>> soft-binding.
>
>
> I still do not know how to do "soft binding" with acceptable implementation
> cost. But anyway, this seems like very hard binding. How would you rebind
> |this|, ever?
>
> /be
>>
>>
>>
>> On Fri, Jun 14, 2013 at 11:45 AM, Axel Rauschmayer <axel at rauschma.de
>> <mailto:axel at rauschma.de>> wrote:
>>
>>     Thanks to proxies now having a separate trap for “invoke”, we can
>>     automatically bind methods on “get”. I’ve written down my thoughts
>>     here:
>>     http://www.2ality.com/2013/06/auto-binding.html
>>
>>     Axel
>>
>>     --     Dr. Axel Rauschmayer
>>     axel at rauschma.de <mailto:axel at rauschma.de>
>>
>>     home: rauschma.de <http://rauschma.de>
>>     twitter: twitter.com/rauschma <http://twitter.com/rauschma>
>>     blog: 2ality.com <http://2ality.com>
>>
>>
>>     _______________________________________________
>>     es-discuss mailing list
>>     es-discuss at mozilla.org <mailto:es-discuss at mozilla.org>
>>     https://mail.mozilla.org/listinfo/es-discuss
>>
>>
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss


More information about the es-discuss mailing list