3 ms·
In the early 90s I was doing IT type C with SQL database software. There was one pattern of goto usage common: clean up at the end of a function if something we
by bogomog 1mo ago
In the early 90s I was doing IT type C with SQL database software. There was one pattern of goto usage common: clean up at the end of a function if something went wrong (close db cursor, log something, return error code, and the like). When that space went to Java and to some extent C++ (and later C#) exceptions could be used instead. A defer statement would have been a more direct replacement for the pattern, though.