DEV Community

Discussion on: Is goto all that bad?

Collapse
 
thumbone profile image
Bernd Wechner • Edited

You weren't weened on BASIC I can tell. The response to GOTO historically, is strongly related to its ubiquity in some early contexts and the resulting phenomenon of unmanageable spaghetti code (thus named because it conjured the image of lots of intertangled code paths [noodles] with no visible rhyme or reason).

Of course prudent use of a single goto or two here or there remains in some contexts, not least the tenacious and still encountered BATCH programming context on Windows. And when a simple script contains a few gotos well structured to capture missing IF/THEN features with a focus on maintainability and clear code, they're livable, not some kind of existential crisis.

Collapse
 
pandademic profile image
Pandademic

I get it know , thanks