Comment by Zanfa

Comment by Zanfa 18 hours ago

0 replies

Positive branch first is good advice when both branches are roughly even in terms of complexity. If the negative branch is just a return, I’d bail early instead.

Negative first makes else-branches double negative which reads weird, eg. if !userExists {…} else {…}