Quote:
Originally Posted by jjshabado
The things that are painful are more structural to Python itself. Tracing through code is harder (With any good Java tool you're always one click away from a variables definition and declaration). Refactoring structural changes is harder (Java tools let you refactor a method signature quite simply or at least show you every instance of that method being called that is now broken). General refactoring like extracting variables/methods/classes, renaming variables, modifying an object hierarchy, etc. are all easier with existing Java tools. And so on.
i don't see how any of these are structural to python itself; these are all features of the java ecosystem. i agree that these things are more mature in java land, but it has nothing to do with weaknesses in the python language or its implementation.
Quote:
In practice, I also find that Python leads to sloppier code in certain situations. If you actually have logic that really benefits from a complex object hierarchy I find its much harder to create and maintain that in Python than it is in Java. The flip side of that is that Java too often forces you into stupid Object verbosity when you don't need/want it - but most Java tools make that at most a minor annoyance.
i agree that python, being more flexible, can be more prone to overly clever code. this is probably worse than the kinds of overly stupid code you tend to get from a more rigid language.
i'll spare everyone the "if you have a complex object hierarchy it's because you don't understand your domain well enough" derail
but i agree that if you *do* need a complex inheritance tree then python's oo stuff is weak and capricious ("meh, i'll call the method from whichever parent i happen to find first").
Quote:
Python is also a bit more fragile in certain ways. For example if you have a large long-lived code base touched by multiple people you generally end up with some sections that are rarely modified/executed/understood. If you don't have a test for that logic its easy to create a bug in that code (say with a simple variable typo) that doesn't get caught until a very inconvenient time.
this happens in all languages, as you know. i don't see how python is any better or worse, really.
there are a few problems that static typing can catch early, but ime these problems never arise when passing simple data structures around (where static types would keep you out of trouble) and only show up when passing complex data structures (which typically require deeper, business-logic-specific validation anyway).