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

I prefer early returns for precondition checking too. i.e. before anything interesting has occurred. Thinking about it though, I've just realized that the early-return problem is sort of a by-product of side effects. If your function simply takes input and produces an output, and you control where side effects are applied, then early returns are far less of an issue.


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

Search: