3 ms·
> Writing statically typed code will always be slower than writing dynamically typed code. Only in the beginning / short-term when the project is new, small, a
by hombre_fatal 7y ago
> Writing statically typed code will always be slower than writing dynamically typed code.
Only in the beginning / short-term when the project is new, small, and fits in your head.
IMO doesn't take much more code and complexity for it to switch over to statically-typed code being faster to write.
As an extreme example, I run an online strategy game implemented in Elm. The game only supported three melee classes but the community made really good points about how ranged classes should work.
I came back to a codebase I hadn't touched in over a year, picked a spot in the code where I knew my physics would have to be updated to handle projectiles, started implementing it, and I basically followed the compile errors until my physics system supported projectiles.
Had it been dynamically-typed, this kind of refactor/overhaul would have required me to recredentialize in much more code and either rewrite tests and/or manually test my code branches at runtime to track down errors. It would have taken much much longer.