2 ms·
> Not everything should be hammered into a JS shaped hole. TypeScript exists because most web developers have to use JavaScript. People realized that massive
by smt88 6y ago
> Not everything should be hammered into a JS shaped hole.
TypeScript exists because most web developers have to use JavaScript.
People realized that massive JavaScript code bases were impossible to maintain, and TypeScript is the solution to that problem.
The relationship between the type system and running code isn't perfect, but it's better than nothing. It's not reasonable to port a 100k+ LoC project to another language.
Comparing TypeScript to [insert your favorite language] is not the point of TypeScript. The point is to make JavaScript maintainable at scale.
- jim-jim-jim 6y agoNow that you've provided an extreme and obvious counter-example, I would still suggest that developers working on a codebase with less than 100k LoC do not in fact have to use JS, and may be selling themselves short by myopically opting for TS when more robust solutions exist. I can't give you an exact figure, but at my previous position we gradually migrated a codebase that was 10s of ks worth of JS/TS over to Purescript, and everybody's life was better off for it.