Typescript isn’t to make your code run faster- it’s to make it faster to write your code, especially in a team environment. It’s super nice to know what types that function your coworker wrote will accept, or what is in that struct. It’s really just a tool to boost programmer confidence, and a must-have for any large new project IMO.
Just to nitpick: it is to boost team programming efficiency, not confidence. TypeScript acts as a tool to force programmers to better communicate the intent of the code, so that other programmers do not guess the intent incorrectly and write bugs. Especially when there a change to old code that may cause regression. Because the compiler catches these situations, regression does not happen and programmers save a lot of time by avoiding unnecessary bug hunting trips.
Comments
Typescript isn’t to make your code run faster- it’s to make it faster to write your code, especially in a team environment. It’s super nice to know what types that function your coworker wrote will accept, or what is in that struct. It’s really just a tool to boost programmer confidence, and a must-have for any large new project IMO.
Just to nitpick: it is to boost team programming efficiency, not confidence. TypeScript acts as a tool to force programmers to better communicate the intent of the code, so that other programmers do not guess the intent incorrectly and write bugs. Especially when there a change to old code that may cause regression. Because the compiler catches these situations, regression does not happen and programmers save a lot of time by avoiding unnecessary bug hunting trips.
Fair enough- when I say “confidence” above I mean “I’m confident this function is the correct one and has the parameters I think it does”