3 ms·
for me the cognitive load of if(an expression) { if(another expression) { } } is MUCH lower than if(an expression && another expressi
by jcelerier 4y ago
for me the cognitive load of
if(an expression) {
if(another expression) {
}
}
is MUCH lower than
if(an expression && another expression) {
}
which always raise the questions of:
- did the author think about operator precedence
- did the author want to use && or &
- did the author think about short-circuiting (as evidenced in this very thread, a lot of people do not)
- nuancebydefault 4y agoAnd not to forget, is it okay to omit parentheses, does && take precedence over any other symbol in the expression?