Hacker News new | ask | show | jobs
by gubsz 2377 days ago
I can't tell if you're being sarcastic or not, but I'm really curious about the TypeScript hate. Besides some odd type mapping here and there, I've really enjoyed using it over plain old JS.
1 comments

TypeErrors are just not a problem that I need a compiler to solve for me.
I used to feel that way — and in some situations I still do, like for a short script that I think won’t change much over time. But for a lot of situations I realized that I had so many things to keep track of myself. If there was an easy way for me to be looking back over my shoulder less, like with static typing, I was all for it.

Static typing lets me front-load the effort of making sure many different buggy cases won’t happen. The alternative is for me to think really hard proving to myself that those cases won’t happen each time I come back to the code in the future to add a feature or make a change.

More like front load all the effort of every error that may or may not happen.