:)
- Where is this method being used? - If I delete or change this method will anything break? ....
The main issues with large codebases are often not feature-based but rather maintenance and operational overhead related: undiscoverability, config hell, dependency hell, and scaling issues - and typing helps a little bit with one of those.
If you delete a method that has usages without searching for them, you're asking for trouble. Sure it's not a compilation error in python, but compilation can only show that the method is missing, not that changes are guaranteed to work.
If I delete a method, I automatically get a big red dot in the corner showing compilation errors (without compiling).
If I change a type from string to int in both my method and method signature, it automatically tells me every place that would break.
How do you find usages in a provable correct way in a dynamic language?
I can’t understand why developers would want to take a tool out of their tool belt like static checking.
I’m a fan of Python as a low overhead scripting language but for large systems with multiple developers, static type checking is a godsend.
How much of it is generated?
To be fair, Django is pretty good: iirc, it induces good discipline for development, which is perhaps why it is so easy to handle a large codebase.
On the other hand, the business logic is outside the scope of Django (or any other framework), and there, if the devs do not follow good practices and develop the right tools, it might be more difficult to be productive.
The way I see it, people using dynamic languages have much more freedom in development, but also less safeguards, which means that they have to build them to make their code more robust. Having code generators is a way of getting back some safety, because you only have to make sure the generators are producing correct code.
Custom code, however, need to be thoroughly tested to be considered safe, and if the compiler doesn't do any type level consistency check, it's that many more tests that needs to be written, which adds up to the LOC count.
Code generation has so many downsides and Python is so dynamic I can't think what you're doing that couldn't be done better without code generation.
What I like about Python is the ease of which you can layout a project to fit your needs. Maintaining a large codebase is more about layout/architecture than the language itself.
Maybe other languages are simply better suited for programmers who lack the need of keeping their codebase clean and tidy :)