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

> If it spreads everywhere then that is because it is valuable everywhere.

Well, there is a downside in that you're now having to choose between adding type annotations where you don't particularly want them or ignoring compiler errors (warnings?). The former puts types everywhere, the latter partially defeats the purpose of static typing and adds "sort out the errors I care about" as another work duty.

My understanding is that with typescript you can use .js/.ts files as a relatively coarse mechanism of segregating out your untyped code, but it isn't entirely roses.



> ... choose between adding type annotations where you don't particularly want them or ignoring compiler errors ...

That is just not the case. Types get inferred. If the inference isn't making it all the way through that means you have dynamic types, not a compilation error.

And yes, ignoring warnings is crazy. TypeScript has very few warnings, mostly just errors that can't be ignored.




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

Search: