3 ms·
Most reasonable programmers have understood "GOTO Considered Harmful" to be a recommendation, not a doctrine. Goto can be very useful when used carefully, most
by AdmiralAsshat 11y ago
Most reasonable programmers have understood "GOTO Considered Harmful" to be a recommendation, not a doctrine.
Goto can be very useful when used carefully, most often for a "cleanup" block, as used in the example above. It's especially common in C where the memory needs to be freed before exiting.