4 ms·
It's not necessarily so much about the coding. It's about the maintenance and refactoring. The people who like types aren't so much the implementors who dicta
by T-hawk 7y ago
It's not necessarily so much about the coding. It's about the maintenance and refactoring. The people who like types aren't so much the implementors who dictate the original full view of the system; the people who like types are the janitors who have to understand and clean up and extend the system down the road.
Suppose you're writing an e-commerce system. It's fast and convenient to just stick a value in a Price field and not worry about whether it's a float or decimal or even concatenated as a string somewhere, if everything seems to work.
Now two years later you or some poor successor is tasked to implement a feature that Price not be a single value, but a list or some other structure, say it's keyed with different values over time or per market segmentation or A/B testing or whatever. That engineer will be really glad to have a strong type system that can catch every reference to Price being a single numeric value.