News for hackers. Stuff that matters.
Re:Fat arrow functions in Javascript by _greim_ on Friday September 20, 2013 @01:40PM (#6419255)
> The fat arrow permanently binds the value of "this"

I'm still trying to understand the details here, but my impression is that ()=>{} isn't a shorthand for function(){}.bind(this). The latter creates two functions, one with an auto-bound "this" and another with a manually-bound "this". The former creates one function, skipping the step of auto-binding a new "this" to it. So it just sees the outer "this" via the normal scope chain (I think). The idea being that JS is doing fewer things in the background and makes functional programming a little easier on the CPU.

Re:Fat arrow functions in Javascript by ax on Friday September 20, 2013 @04:28PM (#6420299)
Each function has its own this binding - the conceptual model for this is that its an implicit argument to every function call. There is no scope chain lookup for "this". Although, there is no way to observe any difference between your understanding of the semantics or the bind semantics (which is a valid desugarding AFAIK) so the distinction is mostly moot...