Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It’s funny because the reason you used a language like typescript is because you want the compiler to be 100% sure that it’s compatible, not relying on human reasoning.

If you were going to rely on that anyway, why not just use JavaScript as is and avoid the boilerplate from typescript



The code I linked for example results in a web router that is fully type safe.

It's not like using js at all, not that I think there's anything wrong with it, if that's your jam.


Because typescript’s type-checking helps with 99.99%% of the code, and then 0.01% of the time when it doesn’t you use an escape hatch.


> It’s funny because the reason you used a language like typescript is because you want the compiler to be 100% sure that it’s compatible, not relying on human reasoning.

I ever used Typescript because I hoped it would catch some bugs that I didn't (and it did). I never expect it to be 100%. I can't even imagine 100% of what.


This is a great example of "letting perfect be the enemy of good enough".

Typescript is "good enough" at it's job. That's a great reason to use it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: