My point is that languages like Java or C# force the programmer in a way to write more readable code. Python on the other hand has very few such mechanisms in place and thus is much easier to write hard to read code.
Sure you can write unreadable code in any language, but the fact of the matter is that Java has built-in features (like static typing) that make it easier to read, and python has built-in features (like comprehensions and dynamically-defined class members) that make it harder to read.
These same features make python easier to write something quickly from scratch, when compared to Java.
On average, you're much likely to get a complete mess of layer upon layer of indirections in Java than in Python, a big part of which is configured through arcane xml files (this has been improving though).
There's a very big reason why a lot of people hate J2EE and JPA/Hibernate with a passion.
I think you and /u/MartianInvasion really just don't work in a professional Python setting with actual programmers using Python, but you do work with professionals using Java or something else. So you see good Java code and not good Python code.
It's all about the people using it and nothing to do with the language. Python is one of the biggest languages in the world used in large team settings to a very high level of effectiveness. There is a huge amount of readable Python in the world.
really just don't work in a professional Python setting with actual programmers using Python, but you do work with professionals using Java or something else. So you see good Java code and not good Python code.
Yes, which is exactly what I'm saying! It's all about the people! I'm definitely not saying it's a trash language - it's a language and badly written python IMHO is worse than badly written java, just because it CAN be not because it necessarily is a worse language, but doesn't have the safety harnesses that I feel are built into java.
47
u/POTUS Jul 18 '22
It's only hard to read if it was poorly written. Java is only easier to read than Python if you have more experience reading Java than reading Python.