3 ms·
A perspective from a backend developer who is spoiled from working with very good programming languages: > Why isn't React still using `createClass()` and mixi
by valenterry 6y ago
A perspective from a backend developer who is spoiled from working with very good programming languages:
> Why isn't React still using `createClass()` and mixins? Why were ES6 classes and hooks invented? Why did JS add arrow functions and `async/await`?
Sorry, but all of these are mistakes. I predict that hooks will not survive the battle of time as well as react as a whole will. Arrow functions are mere syntatic sugar, but async/await was a mistake.
- robertlagrant 6y agoExactly! What's the point of a widescreen monitor if I can't have promises 10 levels deep?
- valenterry 6y agoAny half modern language has a syntax construct for it. Unfortunately Javascript is on it's way but not there yet. I could explain it, but it's already described here better than I could: https://gist.github.com/MaiaVictor/bc0c02b6d1fbc7e3dbae838fb1376c80 https://gist.github.com/MaiaVictor/bc0c02b6d1fbc7e3dbae838fb... (scroll to "do-notation")
- robertlagrant 6y ago> Now everything is good and JavaScript is great again, yet I wonder why it took so long Have you read it? It's saying Javascript has something like that.
- valenterry 6y agoNo it's not. It is saying Javascript has asnyc/await which is just a specialization of the more general monad-o-syntax (or however you want to call it). And that is precisely what I meant.
- robertlagrant 6y agoThe article likes them; you said they're a mistake.