3 ms·
This is, in fact, a great solution in certain contexts: http://wwwens.uqac.ca/~flemieux/PRO102/goto_Rubin.pdf http://wwwens.uqac.ca/~flemieux/PRO102/goto_Rubin
by seliopou 15y ago
This is, in fact, a great solution in certain contexts:
http://wwwens.uqac.ca/~flemieux/PRO102/goto_Rubin.pdf http://wwwens.uqac.ca/~flemieux/PRO102/goto_Rubin.pdf
- cellularmitosis 15y agoAgreed, 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.
- masklinn 15y ago> 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.