3 ms·
It's my opinion (but one I strongly hold) that good maintainable code is modularized and clean - with strict types and a heavy emphasis on clean contracts betwe
by munk-a 3y ago
It's my opinion (but one I strongly hold) that good maintainable code is modularized and clean - with strict types and a heavy emphasis on clean contracts between different components (since in an organization/large open source project many people will be contributing in parallel). It relies heavily on common patterns and styling for easy recognition and tries to do things in the least sneaky way possible.
If you're aiming for this state of a codebase you'll lean heavily towards Object/Modular oriented styles which strongly resemble Java/C++ etc - even languages that express them in dramatically different manners (like OCaML) end up looking really familiar when built in a sustainable manner. There is a common visual expectation we have around code that promotes readability[1] and we'll form code in most languages to match that common visual expression. This is actually one reason I decidedly dislike python - since it's visual expression is encoded into the syntax evaluation of the language itself.
Anyways the TL;DR is that, IMO, clean maintainable code looks like clean maintainable code and the language only minorly impacts this appearance.
1. That isn't to say this is necessarily the best visual expression - it could just have been chosen early on and then just ingrained in us all.
- pphysch 3y agoI completely disagree with this. The classic Java-style "enterprise OOP" code is a symptom of poor software design and papering over bad abstractions with more abstractions. There's a lot of this code also written in Python. However, I think Python's forced indentation and cleaner syntax is a boon because it makes bad code look bad and unreadable. Too often, variations in style conventions are used as a smokescreen for rubbish software.