I noticed that everyone says "Don't use Gotos!" but why? Why are they bad?!?!
I noticed that everyone says "Don't use Gotos!" but why? Why are they bad?!?!
GOTOs jump around in your code, are confusing to deal with, and when you need to change something it can be very difficult.Originally Posted by Cool-August
Functions are better because they can use parameters, return specific values (side effects are usu. intentional & obvious), and use local variables.
Plus they just keep your code all in one spot and better structured.
Right?