gotos

Dave Burton daveb at laidbak.UUCP
Thu May 5 00:38:20 AEST 1988


In article <2639 at ttrdc.UUCP> levy at ttrdc.UUCP (Daniel R. Levy) writes:
|Henry,
|If you really, truly believe that "properly designed" code practically never
|needs a goto, you ought to write a book on the subject.  I mean this in all
|seriousness.  Just lording it over the "unenlightened" masses (actually,
|people who program AT ALL aren't a dumb bunch) without sharing the full secrets
|of your wisdom is tantamount to being smart alecky.

Such a book already exists: _Software Tools_ by Kernighan & Plauger (and
its sister, _Software Tools in Pascal_). This book provide an excellent
example of 'good code', without using (any?) gotos. By extending FORTRAN
to include control flow constructs besides the goto, K&P were able to write
some moderately sophisticated programs (a roff-like text formatter, a text
editor, and a ratfor preprocessor) without gotos.

I would bet that most of you have at least heard of these books, which makes
me wonder why nobody seems to acknowledge their existence, especially in
light of all the recent 'what constitutes a good program' discussion. I have
found them invaluable.



More information about the Comp.lang.c mailing list