3 ms·
I think 'clean' can only be evaluated in context. For instance, whenever I write code for public distribution I try to use the same layout principles and code
by true_religion 11y ago
I think 'clean' can only be evaluated in context.
For instance, whenever I write code for public distribution I try to use the same layout principles and code style rules that are popular within my target audience.
Additionally, I try to present concepts in a way that will either be idiomatic to the target audience or at the very least not judged as unusual.
To give a silly hypothetical example. If I were writing code to be delivered to a company that never uses list comprehensions within Python, I'd write everything as an explicit for-in-loop.
This is less of a problem in certain languages where there's explicit global style guides and a tendency to conservatism (Python). Other communities where that's not the case, like Smalltalk, Lisp, and now Elixir, one can see varying control statements and code inheritance methodologies practiced by different groups simply because of how easy it is to implement, and that doing so isn't shunned.