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

This is, in fact, a great solution in certain contexts:

http://wwwens.uqac.ca/~flemieux/PRO102/goto_Rubin.pdf




Agreed, goto can actually be a great way to adhere to DRY when dealing with a lot of similar error condition checks. Used in the right context, it's bad rap is undeserved.


> it's bad rap is undeserved.

Its bad rap is entirely deserved. Goto is a fine tool in a few cases, but it's an awful general-purpose tool when better control structures exist, and its usage in this case — common when structured programming got its start — makes code significantly worse.




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

Search: