Submitted by Dacadey t3_z89cro in explainlikeimfive
DTux5249 t1_iyc6i19 wrote
The issue is that "goto" plops you somewhere in the program, but with little to no way back.
Programming practice likes consistency, and linear flow. Every line is an instruction, and should be followed in sequence.
Even if I have to say, call a method from somewhere else in the code, I'm still sitting in the same place. I can leave where I am, go do whatever, then come back and continue where I left off. Clean.
"Goto" though? I could've jumped 5 lines ahead, or 269, and I have no way back. It's obscenely reckless in large programs, making them an absolute pain to edit, and it's just lazy in smaller programs.
Viewing a single comment thread. View all comments