Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Mithaldu
on Feb 15, 2017
|
parent
|
context
|
favorite
| on:
Callback Hell (2016)
Please don't perpetuate the else silliness of the (intentionally bad) first example there. Stick a return in front of the log calls, lose the else, and unindent all following.
athenot
on Feb 15, 2017
[–]
Yes, that is of course preferable. There are much better error handling strategies than what the example gave.
I was only commenting on the readability aspect, all other things being equal.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: