Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
meowface
8 months ago
|
parent
|
context
|
favorite
| on:
Cognitive load is what matters
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.
ziml77
8 months ago
[–]
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: