3 ms·
the this keyword still works exactly the same, just a terse syntax for functions and for function binding to the current scope. currently, function(){} is the
by mattbriggs 15y ago
the this keyword still works exactly the same, just a terse syntax for functions and for function binding to the current scope.
currently, function(){} is the exact same as the proposed ()->{}, and (function(){}).bind(this) is the exact same as ()=>{}
- starwed 15y agoThis is not just about syntax. Unless using bind somehow grants the mentioned property that >"Fat arrow functions do not have prototype properties, which makes them cheaper to make. They are immutable."
- mattbriggs 15y agogranted, but that sounds more like a micro optimization rather then significantly changing the behavior of the language