Hacker News new | ask | show | jobs
by julian_t 4515 days ago
Snobol... where patterns are first class constructs, and every line can end with a GOTO. That definitely lets you write some very, er, compact code. But it was superb to program in.

And how about the assigned GOTO in older versions of Fortran? "GOTO N" where N is an integer variable whose value will be known at runtime.

Happy days...

1 comments

I'm sure you'll be pleased to find that gcc has kept the assigned goto alive as a c extension.

    #include <stdio.h>

    int main( int argc, char ** argv ){

      void * p = && lol ;

     bounce:
      goto *p ;

     lol:
      printf("lol %p\n", p);
      p = && wtf;
      goto bounce;

     wtf:
      printf("wtf %p\n", p);
      p = && lol;
      goto bounce;

    }