Growing pains for typing in Python
Growing pains for typing in Python
Posted Jan 19, 2024 9:10 UTC (Fri) by ringerc (subscriber, #3071)In reply to: Growing pains for typing in Python by aigarius
Parent article: Growing pains for typing in Python
Test coverage is great and all. But it's amazing how many bugs can be present in a code base with 100 line based coverage. Even if you check coverage of branch permutations in functions (hardly anybody does), it's basically impossible to do it deeper than function scope, and only in small functions.
Type systems make it much easier to say "doing this shouldn't work" or "the meaning of this has changed and you need to check everywhere that consumes the old thing to make sure it will understand the new thing".
Yes, it's tedious, harder to design well, and can be lots of pointless-seeming labour. They are IMO overused unnecessarily. But for interfaces between large complex systems they're fantastic, and in languages without type systems people end up inventing their own inconsistent homebrew for this sort of job.
