That is an excellent paper! I rarely use goto, but sometimes it is the best solution to a problem. (Example: escaping from multiple nested loops.) I once read someone’s general rule that you always go forward, but I found one exception years ago:
NEXT_BYTE:
if( x>xmin ) {
Byte = *(--vptr);
/* Skip whole bytes */
if( Byte == 0xFF ) {
x -= 8;
goto NEXT_BYTE;
}
}
Sure the above code could be written using a loop and originally was, but this increased the speed (graphics code) enough to justify its use at the time.
INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra