btcx@vax5.CIT.CORNELL.EDU (03/17/89)
In article <1317@uw-entropy.ms.washington.edu> charlie@mica.stat.washington.edu (Charlie Geyer) writes: >... >It's not failure to end every loop with its own CONTINUE that is the >problem. It is (surprise!) GOTO's are harmful. Well, not quite. Now, I'm not a GOTO freak, and I learned to only goto CONTINUE's, but does anybody realize the origin of the anti-GOTO religion? And how the above statement is a misrepresentation of that origin? (see BTW below) It's not GOTO's that are harmful, but POOR USE OF goto's that's harmful. The fault, dear Brutus, lies not in our GOTO's, but in our selves. or, more generally, There is no such thing as a structured programming language, only structured programmers. I don't believe I actually had to post this in .fortran! :-) Yes, i HAD to; I can't resist statements by the True Believers. :-) Go back to .c or .pascal or .modula or ... where you belong. leave us dinosaurs alone! BTW, the origin of anti-GOTOism was an early 60's paper that proposed/observed an inverse correlation of programMER quality and frequency of GOTO use. N.B. the criticism was aimed at *programmers*, NOT goto's. I have just said the same thing 4 times, pardon me for repeating myself.
jlg@lanl.gov (Jim Giles) (03/17/89)
From article <18178@vax5.CIT.CORNELL.EDU>, by btcx@vax5.CIT.CORNELL.EDU: > [...] > Now, I'm not a GOTO freak, and I learned to only goto CONTINUE's, but > does anybody realize the origin of the anti-GOTO religion? And how the above > statement is a misrepresentation of that origin? (see BTW below) > > [...] > > BTW, the origin of anti-GOTOism was an early 60's paper that proposed/observed > an inverse correlation of programMER quality and frequency of GOTO use. > N.B. the criticism was aimed at *programmers*, NOT goto's. You are missing a subtle linguistic issue here. I always distinguish between 'structured programming' (all lower case letters) and 'Structured Programming' with initial caps. The first ('structured programming') was a programming technique promoted in the late 60's and early 70's (by Dijkstra, among others). This technique consisted mainly of stepwise refinement of the program specification together with careful selection of data structures. The main purpose of this 'structured programming' was to promote the quality of programs in terms of reliability and maintainability. This first definition of 'structured programming' is almost _never_ used any more. The second version ('Structured Programming') is a modern religious bias against certain language constructs - particularly GOTO's. This bias can trace its roots to a paper by Dijkstra (which you mentioned above) which in its turn was a response to unpublished correspondence from as early as the late 50's/ early 60's. As pointed out above, it was the misuse of GOTO's and not GOTO's themselves which were the target of attack. The purpose again was to promote the quality of programs. The modern bias has, however, completely lost track of the original issue. 'Structured Programming' as the term is presently used has no relation to improving code quality but, is instead, just a stylistic bias - often called a religion. It is unfortunate that this second (and less useful) meaning of the phrase is the most commonly used (almost to the exclusion of the other). It is often the case that using a GOTO is the most 'structured' way to do something, but it is _never_ the most 'Structured' way to do something.