Ok I admit that when I used BASIC back in 1979, I put GOTOs in my code.
GOTO isn't evil, it just has no meaningful context without a comment or convention. All the classic 'structured programming' control structures are nothing but simple conjugations of conditional GOTOs -- what they provide is idiomatic context.
clisp> (macroexpand '(dotimes (i n) blah blah blah))
(BLOCK NIL
(LET ((I 0) (#:COUNT-2814 N))
(TAGBODY
#:LOOP-2815
(IF (>= I #:COUNT-2814)
(GO #:END-2816))
BLAH BLAH BLAH
(PSETQ I (1+ I))
(GO #:LOOP-2815)
#:END-2816
(RETURN-FROM NIL (PROGN NIL)))))
(goto in Common Lisp is (go ...) )Naked GOTOs were indeed evil and led to endless loops and sleepless nights. There was no structure to them.
Pascal was our savior.