Why is goto considered evil in Java and other high-level programming languages? [duplicate]

旧时模样 提交于 2021-02-07 20:52:23

问题


Possible Duplicate:
Is there a goto statement in java?

Why is goto considered evil in Java, and why is is not suitable for use in high-level programming languages?


回答1:


The simplest answer is it makes code unmanageable and difficult to follow after it exceeds certain lines of code.

A better reason.. xkcd

Image courtesy of xkcd



来源:https://stackoverflow.com/questions/13785068/why-is-goto-considered-evil-in-java-and-other-high-level-programming-languages

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!