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

> the problems it did flag mostly would be caught by minimal testing

Testing is more expensive up front and in maintenance than type annotations. A test suite comprehensive enough to replace type annotations would have an ass load of assertions that just asserted variable type; if you were involved in early pre-TS Node, you remember those test suites and how they basically made code immutable.

> (2) it regularly missed deeper problems

This is a skill issue. If your types do not match runtime behavior and you choose to blame the programming language rather than your usage of it, that's on you. There are a lot of unsafe edges to TS, but a diligent and disciplined engineer can keep them isolated and wrapped in safe blocks. Turn off `any`, turn on all the maximal strictness checks, and see if your code still passes, because if what you said about infinite scroll is true, it won't.



> here are a lot of unsafe edges to TS

And one of its many problems is that it tries quite hard to pass itself off as not having those unsafe edges which, ironically, makes it easier to get tripped up by them.




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

Search: