3 ms·
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
by cellularmitosis 15y ago
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.
- 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.