3 ms·
> The calculate_price function doesn't care what object you give it, as long as it has the two attributes it needs The issue with this is it makes it difficult
by mountainriver 5y ago
> The calculate_price function doesn't care what object you give it, as long as it has the two attributes it needs
The issue with this is it makes it difficult to understand code. If anything works potentially anywhere then the flip side is you have no idea what works anywhere without running the code.
Running code is slower iteration cycles than a type checker. Also you don’t actually know what it returned. So it was able to produce an output, was it what you expected? Or was it subtly different in ways that will break your code downstream.
I work at a company with a large untyped code base and the product is constantly breaking in these ways.