Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.misc Subject: Re: The "evil" GOTO (Was: 25 Years of BASIC) Message-ID: <13589@lanl.gov> Date: 13 May 89 02:20:41 GMT References: <140@quad.uucp> Organization: Los Alamos National Laboratory Lines: 27 From article <140@quad.uucp>, by dts@quad.uucp (David T. Sandberg): > [...] > However, I still wouldn't call the version with a GOTO a structured > version, for the reason that, in my understanding, one of the main > rules of structured programming is that there are only three > structures - sequential, iterative, and conditional. [...] I read the definitive book: 'Structured Programming', by O.-J. Dahl, E.W. Dijkstra, and C.A.R. Hoare; when it first came out in 1972. This was after the famous 'GOTO Considered Harmful' letter and there is _one_ page in the book which discusses the need to use GOTOs with _care_. The rest of the book doesn't make recommendations on programming language flow control constructs - certainly it _never_ maintained that sequence, condition, and iteration are the _only_ way to write structured programs (in fact, there are examples in the book which use GOTOs). In any case, the original meaning of structured programming consisted of a model for program development (using stepwise refinement from an abstract specification of the task) plus a model for developing data structures (where GOTO's partner in crime - the lowly pointer - was _not_ even mentioned). It is too bad that the term "structured programming" has since become synonymous with GOTO evasion and nothing more. The principles in the book, while not followed by the vast majority of programmers ("structured" or not), are worth more than the debate about GOTOs has ever been.