4 ms·
Does it really? I'm not being pedantic. My experience has been that coding guidelines/style and personal standards are what encourage good, maintainable code. N
by bliti 13y ago
Does it really? I'm not being pedantic. My experience has been that coding guidelines/style and personal standards are what encourage good, maintainable code. Not the language itself. I've seen beautiful PHP, just like I've seen horrendous Python.
- teilo 13y agoSomewhat. The clean syntax of the language certainly helps. However, it's not really Python itself that encourages clean code. It's the Python way -- meaning the culture. The concept that there should be only one right way to do things is extended right down to the way code is formatted. There is even an official PEP (Python equivalent to an RFC) which covers it. In other words, in the Python world, personal standards are discouraged, and there is a remarkable amount of voluntary compliance with the community standards. I work in a number of other languages on a regular basis, and while there are certainly a set of best-practices out there for most languages (often 2 or 3 of them, in fact), I don't see anything nearly so much uniform compliance as in the Python world. I don't really know why.
- bcj 13y agoAs I've grown more experienced with writing Python code, my interest in writing readable code has also grown. I would guess that most of the readability concerns come from graduating, as I started working with other people on non-disposable code. I feel Python has played a part too though. Python has an official style guide (PEP 8), so code is more homogenous across developers. Python also has a set of core principles (the Zen of Python) which put a focus on readable code.