GOTOphobia considered harmful in C
The problem with <i>goto</i> is that it is an unbelievably primitive operator. It can be used to implement any logic at all, and therefore it does not express any logic very clearly. It&#x27;s a bad way to express intent in code. Aside from the exceptions discussed in the article, there is always a better, clearer way to express logic than to use <i>goto</i> statements.<p>The same is true of <i>while</i> loops. Aside from a few cases where they are required, they are always better rewritten with a less primitive operator (<i>for</i>, etc). The arguments that programmers today make in defense of <i>while</i> are quite similar to the arguments programmers used to make in defense of <i>goto</i>.