Hacker News new | past | comments | ask | show | jobs | submit login

I just checked, and MISRA 2012 seems to allow goto again under certain preconditions (you have to have a label declared in the same function and it has to be in the same block). So actually you can do proper error handling again.

Still single return statement, which usually makes for more spaghetti.




Yeah, seems like it actually allows my second example which is good! :)




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

Search: