3 ms·
Is this one of those rare cases where using a goto would be reasonable?
by quux 3y ago
Is this one of those rare cases where using a goto would be reasonable?
- mjevans 3y agoThe main case I ever found was implement missing language features. E.G. break 3; // Break 3 levels up break LABEL; // Break to a named label - safer-ish than goto goto LABEL; // When you have no other option. Usually for breaking out of a really deep set of loops to an outer loop. Such as a data stream reset, end of data, or for an error so bad a different language might E.G. throw an error and usually die.