OK folks. Readability IS a sign of code quality - for sure. HOWEVER, that does not mean it is necessary to drop useful elements of any language. You can't assert "never use a knive!" simply because misuse of knives is dangerous and can be BLOODY.
It is interesting to note, how little the examples in this post are commented !
ALTERNATIVELY, consider focussing on more and proper commenting:
// Process the passed argument, ... the result of the ... calculation ... , ... if it is useful
if myVariable != nil {
//DoSomeUsefulStuff()
}
Now judge by yourself how well the else part reads if commented (of course with some context of the preceeding IF logic)
// Drop out of the function / procedure if the passed argument, ... the result of the ... calculation ... , ... is NOT useful
} else {
return “”
}
My personal summary on code readability: Do comment;
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
OK folks. Readability IS a sign of code quality - for sure. HOWEVER, that does not mean it is necessary to drop useful elements of any language. You can't assert "never use a knive!" simply because misuse of knives is dangerous and can be BLOODY.
It is interesting to note, how little the examples in this post are commented !
ALTERNATIVELY, consider focussing on more and proper commenting:
// Process the passed argument, ... the result of the ... calculation ... , ... if it is useful
if myVariable != nil {
//DoSomeUsefulStuff()
}
Now judge by yourself how well the else part reads if commented (of course with some context of the preceeding IF logic)
// Drop out of the function / procedure if the passed argument, ... the result of the ... calculation ... , ... is NOT useful
} else {
return “”
}
My personal summary on code readability: Do comment;