what kind of problem is this fat arrow feature trying to solve ?
claude.pache at gmail.com
Wed Oct 2 01:37:53 PDT 2013
Le 2 oct. 2013 à 09:34, David Bruant <bruant.d at gmail.com> a écrit :
> One of the reason of arrow functions to exist is to get rid of the need for "var self = this" or equivalent ('that', '_this', etc.). Example on MDN:
+1. The big win of arrow-functions, is that it prevents from using various ad-hoc kludges (`var that = this`, `.some(..., this)`, etc), whose sole goal is to defeat some unwanted feature (proper `this` binding in callbacks). Not a killing-feature, but a nice addition that will help to reduce noise in code.
More information about the es-discuss