4 ms·
Typing wastes time. Teammate and I tried switching a backend project to TS, and I kept a mental note of time spent defining types vs time saved not debugging ty
by hot_gril 4y ago
Typing wastes time. Teammate and I tried switching a backend project to TS, and I kept a mental note of time spent defining types vs time saved not debugging type-related issues. The result was some high number vs 0. Also messed with the toolchain, making things like Node profiling not work.
- tomtheelder 4y agoIs it a solo project? The time savings of typing is really a function of project size and number of collaborators. For a small, solo project it’s either neutral or a negative.
- hot_gril 4y agoIt was team-sized. So, not writing open-source libs used by multiple companies or something, but ~10 people were looking at the code. At my current job we do have a lot of untyped Python used by tons of people, and it's fine. People can read the code without it asserting in every line what each variable is. You just make sure any widely-used APIs are documented properly, which typing doesn't really help with. Also anything modern is more microservice-oriented which comes with nicer boundaries, and everything has tests (which again typing is no substitute for). Typing seems like a mostly outdated thing for application-level stuff.
- yCombLinks 4y agoIf you already have an existing, functioning codebase, adding types is not saving you time (right now). It's akin to adding a lot of unit tests. You gain time later, and often indirectly from others not making mistakes your types would prevent.
- hot_gril 4y agoAmple time passed, we added more after we were already on TS, and it wasn't helping. In fact it was a constant burden on new code.
- yCombLinks 4y agoAlright, good luck out there. I strongly prefer types