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

sure, but that has limitations as well, since gotos can't cross lexical scopes, so you can't introduce variables later on, and it's easy to mess up.

Destructors are a higher-level and safer approach.



> since gotos can't cross lexical scopes, so you can't introduce variables later on

That's a C++ specific limitation, it works just fine in C.




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

Search: