home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 12984 < prev    next >
Encoding:
Text File  |  1992-08-27  |  1.9 KB  |  46 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!taumet!steve
  3. From: steve@taumet.com (Steve Clamage)
  4. Subject: Re: GOTO, was: Tiny proposal for na
  5. Message-ID: <1992Aug27.181245.10606@taumet.com>
  6. Organization: TauMetric Corporation
  7. References: <714668024@thor> <6800007@tisdec.tis.tandy.com> <1992Aug26.130335.26725@hemlock.cray.com>
  8. Date: Thu, 27 Aug 1992 18:12:45 GMT
  9. Lines: 35
  10.  
  11. dsf@cray.com (Dan Frankowski) writes:
  12.  
  13. >In article <6800007@tisdec.tis.tandy.com> kevinl@tisdec.tis.tandy.com writes:
  14.  
  15. >>    For experienced programmers, the goto is a legitamite tactic.
  16. >>There may not be any cases where a goto is absolutly necessary (I've
  17. >>heard that there are some, but I have yet to see any), ..
  18.  
  19. >I thought that one of the triumphs of the Structured Programming camp
  20. >was an honest-to-goodness proof that any code using gotos could be
  21. >replaced by structured constructs and state variables.
  22.  
  23. It is a common misconception that this was a triumph for structured
  24. programming.
  25.  
  26. The paper: Bohm and Jacopini, "Flow diagrams, Turning machines, and
  27. languages with only two formulation rules", Communications of the ACM,
  28. vol 9 no 5, May 1966, p 366-371.
  29.  
  30. They provide a mathematical proof that any program with goto's can be
  31. transformed into one without them.  The program transformed by their
  32. method is not necessarily a good one, or even understandable.  This
  33. result does not provide a foundation for structured programming, except
  34. in the very limited sense of showing that programming does not
  35. absolutely require goto's.
  36.  
  37. Structured programming rather provides a framework for containing the
  38. complexity of programs.  You can write a structured program in assembler.
  39. Languages supporting structured programming provide alternatives to
  40. the goto which directly implement structured programming concepts,
  41. reducing the need for goto's.
  42. -- 
  43.  
  44. Steve Clamage, TauMetric Corp, steve@taumet.com
  45. Vice Chair, ANSI C++ Committee, X3J16
  46.