7 ms·
I have read a few places recently about techniques and strategies to get rid of ifs and else's in code. It was all in the spirit of writing more concise and com
by wuliwong 12y ago
I have read a few places recently about techniques and strategies to get rid of ifs and else's in code. It was all in the spirit of writing more concise and compact code, not about the actual speed when executing the code. So often, I see "concise" at odds with "readability." The '&&' slide is a good example of this. For me, multi-line if/else statements are pretty easy to read. I hate running into complicated, one line, if else statements, it feels to me that it takes twice as long to parse and understand.