2 ms·
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 mult
by kragen 17y 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.