2 ms·
> Typed Python is far more bug prone, why? Because structuring your Python code to support typing means writing considerably more lines of code. That does not
by kortex 4y ago
> Typed Python is far more bug prone, why? Because structuring your Python code to support typing means writing considerably more lines of code.
That does not bear out in practice. In my experience, bugs have almost nothing to do with LoC. A short bit of complex, I/O heavy code with lots of state is going to be way more bug prone, and far harder to unit test correctly, than 10x the LoC of purely functional, well-typed, stateless code.
Mutation, parallelism, IO, and complex state space are the four horsemen of the bugpocalypse.
But in fact, I find functional, well-typed, properly abstracted code ends up with less LoC in the codebase, because it's more reusable and composes well.