3 ms·
I also dislike Typescript. Like the author stated, the typing comes across as an afterthought. This half-measure results in uglier code that still doesn't come
by jim-jim-jim 6y ago
I also dislike Typescript. Like the author stated, the typing comes across as an afterthought. This half-measure results in uglier code that still doesn't come with enough guarantees. The language's supporters tout this as a strength: that this incremental progress is more approachable to vanilla JS devs. I completely understand that point, but it may be more beneficial in the long run to transition to something like Purescript or Elm, and it may not be too difficult to get there.
There is a tendency among aging millennials to liken every news event to Harry Potter, which has made the response "read another book" popular. I think some web devs need to be told "learn another language." Not everything should be hammered into a JS shaped hole.
- 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.