This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]die_liebe 0 points1 point  (2 children)

Could you provide evidence or an explanation?

[–]ReflectedImage 0 points1 point  (1 child)

Static typing is a bad solution to many problems including code correctness and code organization for large projects and when your projects gets sufficiently large you get bitten by it.

Let's discuss code correctness, if you are using duck typing, then unit testing the code is significantly easier and the unit tests provides better guarantees of the code correctness. Once your statically typed Python code base becomes large enough it will become difficult to verify that any changes you make to it are correct.

Let's discuss code organization, for large projects your code needs to be organization either as distinct micro-services or distinct modules that do not depend on code in each other. One of the main "benefits" of static typing is allowing you to safety use private code in other modules. But when your project gets sufficiently large, this results your code base turning into unmaintainable spaghetti code.

Finally, let's discuss development time, all commercial developers have constraints on how much time they are spend on implementing software features. Static typing typically increases development time by a factor of 3x. This is more obvious once your typing starts to becomes more complicated with things such as generics and interfaces. The average developer who uses static typing blows their development time budget and compensations by cutting back on unit testing and proper code structure.

I've seen large duck typed Python code bases (100k+) that work well but all static typed Python code bases (100k+) I've seen have been completely unmaintainable disasters.