[FoRK] Re: gotos was: open source awareness [was Re: BoRK BoRK BoRK]

Joe Barrera joe at barrera.org
Fri May 20 14:30:15 PDT 2005

Robert Harley wrote:

>  You can't have asked that tongue-in-cheek and expected not to get an
>  actual answer, now, can you?

Well, not on this list, I guess...

>  Obviously gotos are called for once in a while to branch away and
>  handle an error or speical case.

Looks like most or all of your examples would be unnecessary if
you had exception handling and garbage collection. Conversely,
after many years of programming in Java, I can't remember a time
where I needed or wanted to use a goto.

In C, I would very often have a label at the end of a function
that would test various pointer variables and free them if they
were non-null. But that's not required if you don't have to
explicitly free anything, and if there is cleanup to be done explicitly,
there's always the finally block.

- Joe

More information about the FoRK mailing list