Re:Real Programmers Don't Use Pascal (1982)
by droptablemain on Wednesday March 27, 2019 @09:43PM
(#19508333)
"Real programmers aren't afraid of GOTO"
[ Parent
| on HN ]
Re:Real Programmers Don't Use Pascal (1982)
by Zuider on Wednesday March 27, 2019 @11:30PM
(#19508970)
Real programmers don't need to give explicit orders like GOTO. A scowl is enough.
Re:Real Programmers Don't Use Pascal (1982)
by BrissyCoder on Thursday March 28, 2019 @04:49AM
(#19510417)
GOTO is still a legit way to cleanly break out of nested loops. I cringe whenever I hear normie programmers lament on how blanketly bad it is.
Re:Real Programmers Don't Use Pascal (1982)
by cr0sh on Thursday March 28, 2019 @01:14PM
(#19514298)
> break out of nested loops
-deeply- nested loops at that.
I once was on a thread in a forum discussing state machines, and somewhere in the convo the use of GOTO popped up. I wasn't for it, but somebody made mention of how it could be used to implement a state machine very compactly.
Then he showed his code - it was done in PBASIC. I saved a copy of that code, because it was very, very elegant. While I knew there were certain very niche cases for GOTO, I never thought that a state machine would qualify. For me, it does now.
I don't have the code handy, but it reminded me of Duff's device, if you know what that is - just done in BASIC - and not as a SWITCH-CASE of course...
Re:Real Programmers Don't Use Pascal (1982)
by jcranmer on Thursday March 28, 2019 @08:34AM
(#19511528)
I prefer the syntax of newer languages that instead have you label the loop and then break/continue the loop of that level. It tends to make it a little clearer that you're doing a multi-level exit.