'goto" gone from computer languages or is it!

Bjørn Vermo bv at norbionics.com
Fri May 13 06:22:32 CDT 2005


On Fri, 13 May 2005 07:22:55 +0200, Tom Jennings <tomj at wps.com> wrote:

> On Wed, 11 May 2005, Jay West wrote:
>
>> Ya know, I gotta disagree... and this is coming from a programmer who  
>> made liberal use of the GOTO statement.
>
> I have to agree with you too; GOTO is just another tool in the
> toolbox.  It's useful as hell (eg. error-exit it switch() or
> whatever).
>
> A lot of reaction against excessive GOTOs was from the horrible
> things early FORTRANs made you do, and macho programmers who
> stopped learning early. I have to wonder what the cultures of
> optimization that sprung up around drum machines did too.
>
Drum machines made people understand what they were doing.
I am still very impressed with Gier Algol. I doubt I would be able to  
write any kind of functional compiler with that set of hardware  
constraints.

The goto statement, however, is useful or harmful depending on your  
combination of hardware and language implementation.
I do not see the next instruction pointer of a three-address machine as an  
implementation of the goto statement any more than the hidden instruction  
pointer in an X86-CPU which increments just enough to take us past the  
current instruction.

The important point to me is whether there is a "jump to  
somewhere"-concept in the mind of the programmer. If a WHILE is  
implemented in assembler, it is still a while and not "branch-if-false,  
do-something, go-to-top".

-- 
Bjørn


More information about the cctalk mailing list