.... python and c++ are modern and popular and they can't do the thing I said. You asked for an example and having been proven wrong you have just been insulting me
you can easily change the binding scope with a slight change in syntax.
Can you say more about what this means? I'm not familiar enough with Javascript and a quick Google search didn't seem to turn up anything directly relevant.
I've heard that "dynamic this" was one of the big mistakes in Javascript, and that it was corrected by introducing arrow functions in ES6, which always use "lexical this". Do you think that's a fair assesment?
I honestly haven't had to do a lot of javascript pre 2016 so I don't know if I can weigh in much. I would say I use the normal (non arrow) syntax more in my own code, but the ability to switch between them easily is nice
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.
View all comments
Show parent comment
0
u/Code_star Jun 24 '18
DAE JabbaScript is bad lulzzzzzzzzzzzzzzzzzzzzzzzzzzzz