Submitted by Dacadey t3_z89cro in explainlikeimfive
Liese1otte t1_iyd0xn1 wrote
Reply to comment by Symbian_Curator in ELI5: why is using "goto" considered to be a bad practice in programming? by Dacadey
Yea, this. GOTO is not neccessarily a bad thing. It's a thing. More popular codebases (mostly lower level) use GOTOs than people think. It can be handy in rare cases when you are in control and using GOTO won't actually hurt readability / predictability.
It's just that it's really easy to fuck up when using GOTO so you might as well just not at all (especially when you are not an expert on how things tend to work with it).
Same can be applied to other commonly accepted opinions, like using "eval"-type commands.
Viewing a single comment thread. View all comments