Instance bound class methods
Andrea Giammarchi
andrea.giammarchi at gmail.com
Mon Jul 13 16:09:49 UTC 2015
FWIW I've just added an extra possible solution to what is a very common
problem:
https://github.com/zenparsing/es-function-bind/issues/17#issuecomment-120978833
it uses mixins, but I would personally vote +1 to have `::obj.method`
returning every time the same method.
Best Regards
On Mon, Jul 13, 2015 at 4:16 PM, Kevin Smith <zenparsing at gmail.com> wrote:
>
> I am curious if https://github.com/zenparsing/es-function-bind would be
>> related, since it would allow bound function calls to be made by using
>> `obj::fn` while `obj.fn` would result in the unbound first class function.
>>
>
> Well, for that syntax proposal, it would be `::obj.fn`.
>
> But see https://github.com/zenparsing/es-function-bind/issues/17 for some
> interesting semantic issues around the object identity of such an extracted
> method.
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150713/ca744962/attachment-0001.html>
More information about the es-discuss
mailing list