TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Goto is Not Evil, Okay?

2 pointsby javadyanover 13 years ago

1 comment

mooism2over 13 years ago
Goto is a low level construct that shouldn't be used if your language has an appropriate high level construct you could use instead.<p>For example, try...finally constructs allow you to do your clean up once in a single place, and some languages allow you to break out of more than one loop at once.<p>If your language / operating environment doesn't have these constructs, then yes, fall back on goto.<p>(When I were a lad, we didn't 'ave IF-THEN-ELSE, all we 'ad were IF-THEN and GOTO. And <i>line numbers</i>. And we loved it. I wouldn't want to go back to that though.)