Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yep. Use else when the two branches do symmetrical amounts of work. Don't use else if one is an early return.

If you find this discussion interesting you're probably stuck with codebases with overly long functions. My commiserations.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: