Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: gotos
Message-ID: <1988Apr15.170753.867@utzoo.uucp>
Organization: U of Toronto Zoology
References: <1988Apr11.201934.20594@utzoo.uucp> <451@goofy.megatest.UUCP>, <2618@bsu-cs.UUCP>
Date: Fri, 15 Apr 88 17:07:53 GMT

> The best collection of thoughts I have seen on this issue is by Donald
> Knuth, entitled "Structured Programming with goto Statements"...

The amusing thing about Knuth's article is that when you subtract out the
search loops (which can be handled with break or return), the syntax
example (which can be done *much* more elegantly using ungetc()), and the
things that any modern compiler (NB the 4BSD VAX compiler is an antique)
would look after for you... there's nothing left!

Also left as an exercise for the reader is finding the bug in Knuth's
hash-table-search code.  (He might possibly have corrected this in the
reprint; my copy is the original Computing Surveys paper.)  The hazards
of gotos doth make fools of the best of us...
-- 
"Noalias must go.  This is           |  Henry Spencer @ U of Toronto Zoology
non-negotiable."  --DMR              | {allegra,ihnp4,decvax,utai}!utzoo!henry
