Non-method functions and this
Axel Rauschmayer
axel at rauschma.de
Sun May 15 13:09:55 PDT 2011
Sorry for bringing this up again, but I don’t think this particular question has been answered yet:
(1) I would prefer non-method functions not to have a binding for |this| at all.
(2) The solution for ES.next seems to be to (e.g. internally, via =>) bind to |this| of the surrounding method.
Isn’t (1) a better solution? I’m assuming (2) is done, because (1) would be too radical a change (execution contexts etc.)? (1) could be simulated by always binding |this| in non-method functions, but that isn’t done because of performance issues(?)
Thanks!
Axel
--
Dr. Axel Rauschmayer
axel at rauschma.de
twitter.com/rauschma
home: rauschma.de
blog: 2ality.com
More information about the es-discuss
mailing list