News for hackers. Stuff that matters.
Re:Confessions of a terrible programmer by gne1963 on Saturday March 14, 2009 @05:01PM (#516173)
Ok I admit that when I used BASIC back in 1979, I put GOTOs in my code.
Re:Confessions of a terrible programmer by blasdel on Saturday March 14, 2009 @06:36PM (#516254)
So what?

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.

Re:Confessions of a terrible programmer by parenthesis on Saturday March 14, 2009 @06:59PM (#516277)
E.g.:

  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 ...) )
Re:Confessions of a terrible programmer by gne1963 on Sunday March 15, 2009 @06:27AM (#516750)
Of course we all understand (or are forced to use) structures now, but back then GOTOs were evil. We did not have the structural classics we have now. We had to build them. (and use them).

Naked GOTOs were indeed evil and led to endless loops and sleepless nights. There was no structure to them.

Pascal was our savior.

Re:Confessions of a terrible programmer by ewiethoff on Sunday March 15, 2009 @01:07AM (#516615)
I smile when I think of Ruby's throw/catch (not to be confused with raise/rescue) as labeled GOTO.