4 ms·
>On this tangent about Dart, I'm happy that Chrome people prevailed I'm not. We are sentenced for another 20+ yrs for lang with broken 'this' pointer
by tkubacki 11y ago
>On this tangent about Dart, I'm happy that Chrome people prevailed
I'm not. We are sentenced for another 20+ yrs for lang with broken 'this' pointer
- phillipwills 11y agoJust because you don't understand the JavaScript this, doesn't mean it's broken. It behaves exactly the same way every time you use it... It refers to the object that called the function (unless, of course you or someone else overrode it).
- tkubacki 11y agojust because I say 'this' is broken, it doesn't mean I don't understand how it works. 'this' in JS is misleading and confusing - IMHO it's broken design
- robin_reala 11y agoYou might be interested in ES6’s arrow functions, which change the behaviour of this to something you might approve of (you didn’t specify how you thought it was broken): http://tc39wiki.calculist.org/es6/arrow-functions/ http://tc39wiki.calculist.org/es6/arrow-functions/
- tkubacki 11y agoyea there are many different tactics to tackle this issue - still default behaviour is confusing at best - bad design at worst.
- BrendanEich 11y agoLots of languages, notably including Dart, compile to JS now. WebAssembly will support even more with high efficiency in the next year or two -- not in "20+ yrs". Enough with pulling victim-faces! :-P.