Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

To my understanding, the underlying issue is the way to structure code in a maintenance friendly way. It’s just very easy to go awry with unrestricted wild goto. There are more often than not some alternatives control flows which are easier to mentally follow. And things like label in Java[1] already capture most of relevant cases in which a generic goto statements might feel like a valid approach. This doesn’t mean that there is absolutely no case where a goto might be the most elegant easiest way to implement something, but that few cases are exceptional.

I mean, no one feels like using a laser is a proper way to cut butter, but using lasers is sometime the best cutting accurate option.

[1] https://www.geeksforgeeks.org/g-fact-64/



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: