My C++ professor stated that it is taboo if you use the GOTO statement in code. Tell me /prog/, is GOTO as bad as he says? What's your opinion on it?
Name:
Anonymous2007-01-29 2:18
Simply put, yes. GOTO involves an unconditional branch to a specific location and can make your code look confusing and unreadable. Really, there's no reason you should ever have to use a GOTO statement, because it can (99.999999% of the time) be implemented in some other way, that does not involve GOTO.
So, GOTO is not in and of itself a bad thing, but it is used badly, and unnecessary. Your creativity is better spent solving problems than creating unnecesary impediments to understanding.
Also, anyone who uses GOTO is looked down upon as a total n00b in the software industry.