Re: Beastly, Just Beastly
"Goto's are evil, only bone idle spaghetti loving coders use them."
That's a little too black-and-white. tbh, GOTOs are a tool, and refusing to use them outright because they shouldn't be used for everything is like saying you should never use a bucket for anything because it's not suitable for frying bacon in. But sometimes I'm not making bacon, and a bucket is actually quite useful.
I don't see anything particularly wrong with the sparing use of GOTO - if the whole structure of your code relies on them then yeah, it's a horrific nightmare of spaghetti pain (I still wake up screaming after dreams of writing programs in BASIC back in the '80s), but legibility problems only really begin to creep in when you have GOTOs within GOTOs - if you're using GOTO to reach a block which just terminates the program then it's not hard to follow. If you end up following a string of GOTOs (goto 8, do x and goto 24, do y and goto 4, do z and goto 347) then that's when it becomes horrible code.