7 ms·
id this why js devs rewrite everything in typescript now?
by stemc43 5y ago
id this why js devs rewrite everything in typescript now?
- revskill 5y agoBecause it's flexible and type-safe. You have both productivity and scalability on both syntax level and infrastructure level. It's suitable for 99% of programmers and the businesses for now.
- progx 5y agoBut now you need a ton of time to type things.
- Tade0 5y agoOnly a problem if you're trying to be too inventive with it. For most cases it's enough to just define interfaces, enums and maybe bundle some of this into discriminated unions. Throw in some generics for good measure. That's not a lot of work. I've seen people do stuff like dependent types, but unless you're writing a library you don't actually need most of the type system's features.
- kaba0 5y agoThere is type inference. And also, it’s not a typing contest, if typing speed is your bottleneck in programming you are doing something really badly, I suggest plugging in the keyboard.