News for hackers. Stuff that matters.
Re:First look: adding type annotations to JavaScript by chousuke on Thursday March 10, 2022 @05:16PM (#30633253)
no-one is a truly expert programmer 100% of the time.

Types catch a lot of stupid errors that anyone can make, regardless of skill level.

They also localize guarantees. If your data has a type, you don't need to understand the full path it took to arrive in your function to be able to work with it. With dynamic types, you can only hope that a value has the type you need unless you explicitly check every time.

There are no comments on this comment yet.