Closed Voros2 closed 7 years ago
Why? goto isn't bad.
But it's highly discouraged.
goto
is discouraged as a crutch and primarily against people that started programming with BASIC, particularly, the early Microsoft BASIC variants found on Commodore 64 and other microcomputers of the early 1980s where there was no function support and programs would become a tangled web to jump to and from different parts. People that learned to program this way sometimes had/have a hard time grasping the concepts of program flow and functions that are available in more powerful languages.
As it is, though, it's only an unconditional jump instruction. It is quite useful in C when needing to break out of many nested loops, especially in error conditions, or in this particular case, to not bother with the rest of the for
loop. There's nothing really wrong with using goto
where appropriate, and it can make code cleaner rather than messier.
In the parse_argv section. Consider removing it.