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

I've sometimes seen people attack early returns and I've never understood it. To me they make things so much cleaner that it seems like common sense.


I think it makes some sense when you are working in a language that provides no mechanisms for automatically calling cleanup functions on exiting a scope (i.e. C). But otherwise, early returns are much clearer in most cases.




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

Search: