Many times simple conditional judgments do not need to use “if”.
For further actions, you may consider blocking this person and/or reporting abuse
For further actions, you may consider blocking this person and/or reporting abuse
Shinetech Software -
Leandro Veiga -
James -
Saddam Hossain -
Top comments (4)
I don't like these if else constructions either
and work like this:
short, then short...
It's awesome syntax.
I ALWAYS go for the longer "IF" statements because of readability... :)
For me, readability of code is more important than saving a few lines of code.
First code for correctness, then for clarity (the two are often connected, of course!). Finally, and only if you have real empirical evidence that you actually need to, you can look at optimizing. Premature optimization really is evil. Optimization almost always costs you time, clarity, maintainability. You'd better be sure you're buying something worthwhile with that.
Note that good algorithms almost always beat localized tuning. There is no reason you can't have code that is correct, clear, and fast. You'll be unreasonably lucky to get there starting off focusing on `fast' though.