Hacker News new | ask | show | jobs
by 18973294 2921 days ago
Why would it do that? Javascript is more appropriate in the early stages of a project. You don't want to go to the trouble of declaring types everywhere only to realize everything has to change. Once you stabilize you can add in typescript, which is the great thing about it.
3 comments

It is precisely when you want to change everything that types are useful, because the compiler will helpfully point you to all cases that you forgot to change.
No matter what stage of the project, you're implicitly writing code to a specific type whether you know it or not. Typescript just makes types explicit, and makes clear all the places you've made type assumptions. So if you need to change types later in the project, you can do so with confidence knowing that you've handled all the cases you made type assumptions.
Some of us only see a value in dynamic typing for shell scripts, burned too many times in large code bases.