Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
sweetjuly
on Nov 9, 2023
|
parent
|
context
|
favorite
| on:
Interesting Bugs Caught by ESLint's no-constant-bi...
A more common form (and slightly less evil) is for error checking:
if ((error = do_a_thing())) { // some error happened, good thing we saved the error code }
Given the standard "zero is success" paradigm, handling errors is very succinct.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: