3 ms·
The cost is the compile time. My personal application is about 50k loc so the compile time is about 9 seconds with TSC or 1.5 seconds with SWC.
by throwaway0asd 4y ago
The cost is the compile time. My personal application is about 50k loc so the compile time is about 9 seconds with TSC or 1.5 seconds with SWC.
- jshen 4y agoThere are other costs. One study I’ve seen found that writing libraries with typed generic code too longer to write, but we’re slightly faster to use. I’ve found that changing peoples badly typed code is worse than changing similar dynamic code. In short, there is very little empirical data on this, and it’s almost entirely anecdotal. My gut feeling is that if typing were a huge benefit it wouldn’t be so hard to prove.
- throwaway0asd 4y agoAvoid things like generics. Keep your types as primitive as possible. Strong typing will covert an excellent developer into an amazing developer but won’t do anything for extremely bad developers. Data types are not a solution to people problems.
- jshen 4y agoAgree, but the question for me is whether it is clear that it’s better at organizational scale over decades. I think it is, but not hugely so. Edit: I should add that I think there are a ton of things that are far more important for a high performing dev team than types.