home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13510 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.9 KB

  1. Path: sparky!uunet!iphasew!igor!thor!rmartin
  2. From: rmartin@thor.Rational.COM (Bob Martin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: GOTO, was: Tiny proposal for named loops.
  5. Message-ID: <rmartin.716170143@thor>
  6. Date: 11 Sep 92 00:09:03 GMT
  7. References: <2318@devnull.mpd.tandem.com> <rmartin.715001372@thor> <4192@papaya.bbn.com> <1992Sep2.131733.20676@terminator.cc.umich.edu> <r <KERS.92Sep4082931@cdollin.hpl.hp.com> <rmartin.715618743@thor> <1992Sep9.210632.25891@mksol.dseg.ti.com>
  8. Sender: news@Rational.COM
  9. Lines: 33
  10.  
  11. mccall@mksol.dseg.ti.com (fred j mccall 575-3539) writes:
  12.  
  13. |In <rmartin.715618743@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  14.  
  15. |Sorry, but that's hardly the reason.  Where is the 'coupling' or the
  16. |difficulty in maintenance when goto is used for things like error
  17. |handling or error returns? 
  18.  
  19. The coupling is between the error condition, and the error processing.
  20. The error processing control flow is merged with the separate control
  21. flows which detect the error.  
  22.  
  23. These merged control flows get difficult to maintain over time,
  24. because new error conditions arise which need to be handled in almost
  25. the same way, but with a few exceptions.  These exceptions accumulate
  26. in the merged code, and it eventually turns into a nightmare until
  27. someone undoes all the gotos and separates all the error processing.
  28.  
  29. |>The last thing I advocate is a reduction of all code to one linear
  30. |>stream of sequence, selection and repetition.  
  31.  
  32. |But that is exactly your rataionale for why structured programming
  33. |'works'; that it is possible to implement anything using sequence,
  34. |selection, and repetition.
  35.  
  36. I should add 'procedure call' to that list.  Or perhaps method
  37. invocation.  
  38.  
  39. --
  40. Robert Martin                        Training courses offered in:
  41. R. C. M. Consulting                       Object Oriented Analysis
  42. 2080 Cranbrook Rd.                        Object Oriented Design
  43. Green Oaks, Il 60048 (708) 918-1004       C++
  44.