Hacker News new | ask | show | jobs
by Zanfa 389 days ago
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 {…}