Hacker News new | ask | show | jobs
by mantap 2416 days ago
I have found with typescript that having a gradual, structural type system actually helps with quick and dirty prototyping, as it allows me to notate data structures. It's hard to find a reason to use JavaScript.

Note that type errors in typescript are actually just warnings and you can ignore them. I never do, but you can.

1 comments

I've had similar success with the gradual typing in Python. NamedTuples are far superior to ad hoc dictionaries, for both documenting data structures, but also as a prompt to consider the software structure.

I wasn't aware that typescript type errors were only warnings. Every webpack/typescript project I've used must have had the typecheck set to error, leading me to believe typescript was some draconian type checker akin to Rust or Haskell.