Interesting point! I do try to avoid else statements but only to keep my code short.
I think the word NEVER is too strong, sometimes ‘else’ does help readability.
Inverting the if statements is a good technique but most of the time it hurts readability, you need to pause and adjust your thought to the negative statement.
Anyways good article, great spark for discussion
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.
Interesting point! I do try to avoid else statements but only to keep my code short.
I think the word NEVER is too strong, sometimes ‘else’ does help readability.
Inverting the if statements is a good technique but most of the time it hurts readability, you need to pause and adjust your thought to the negative statement.
Anyways good article, great spark for discussion