The thing is, I can foresee that using dynamic this makes stuff confusing and difficult to follow, so why use it at all? I'm not talking about the syntax differences between "classic" anonymous functions and arrow functions, but about the differences in scoping for this.
I am talking about this I use the dynamic this often. It really just depends man. What is cool I think is you don't have to have one or the other, or right any strange closures like var This = this to use the one you want anymore
I guess that in the context of Javascript, having dynamic this makes sense. It would be completely fucked in other languages that have OOP, where instance variables have public/private access modifiers.
View all comments
Show parent comment
2
u/junrrein Jun 27 '18
The thing is, I can foresee that using dynamic
thismakes stuff confusing and difficult to follow, so why use it at all? I'm not talking about the syntax differences between "classic" anonymous functions and arrow functions, but about the differences in scoping forthis.