3 ms·
So much I disagree with here. * The rules in place for any types were created in good faith but small exceptions should be allowed for externally defined struc
by austincheney 6y ago
So much I disagree with here.
* The rules in place for any types were created in good faith but small exceptions should be allowed for externally defined structures you don’t own. It’s nice when type libraries exist on definitely typed but there is not a dined type set for everything.
* I love TypeScript but loathe OOP. When I encounter developers utterly dependent upon OOP I stereotype them as CS students who are largely incapable of self learning and incapable of forming original data structures. That sounds mean, but it’s usually correct. I have yet to encounter a JS developer hopelessly dependent upon OOP that can walk the DOM or asynchronously walk the file system. Earlier in my career this stereotype was reserved for many Java developers but this is no longer the case.
- schwartzworld 6y ago> hopelessly dependent on OOP What are you talking about? Sure OOP has its downsides, but JS classes are just functions used to build custom data types. You could just as easily create the same structures with arrow functions that return objects. Some languages paradigms encourage OOP more than others. TypeScript is one of them, even if you choose to ignore it, as most React devs seem to.
- austincheney 6y agoTypeScript is a superset of JavaScript. It only encourages type declarations and all the restrictions that come with that. My last three personal projects are written in TypeScript. My current personal project is fairly large at 8mb of documentation and code.