Submitted by Dacadey t3_z89cro in explainlikeimfive
Megalocerus t1_iyb9mpc wrote
Reply to comment by tezoatlipoca in ELI5: why is using "goto" considered to be a bad practice in programming? by Dacadey
In COBOL the goto didn't even have to specify the destination. You could do an ALTER and have it go somewhere else. Try reading that.
GOTOs are bad but ALTER is Satanic.
carlovski99 t1_iyc60gq wrote
Or even worse, comefrom https://en.m.wikipedia.org/wiki/COMEFROM
Megalocerus t1_iydadd3 wrote
Yes, that's far worse, but I never encountered that in real code. The rules for using alter were:
-
Don't use it.
-
If you use it, have any GOTO referenced by it leave off the destination in code. Thus, it was just GOTO. by itself on the line with a period, to clue the programmer it was a trap.
Existing-Metal-5211 t1_iydidtc wrote
Naw... I did some stuff like that in basic by poking the basic code with destination. I cannot recall why I didn't use on goto for that project tho.
Viewing a single comment thread. View all comments