Hacker News new | ask | show | jobs
by kragen 6171 days ago
Some of these "violations" are good ideas in some contexts. Tom Duff has written a pretty good, clear case for "single entry, multiple exit" in the form of multiple conditional return statements in a function. And Rob Pike has made a pretty clear case that this:

        for(i=0 to 100)
                array[i]=0;
is better than this:

        for(elementnumber=0 to 100)
                array[elementnumber]=0;
But that involves variables named with 1 or 2 characters.

The rest I pretty much agree with, except in very unusual cases.