home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13508 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  2.0 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 na
  5. Message-ID: <rmartin.716168766@thor>
  6. Date: 10 Sep 92 23:46:06 GMT
  7. References: <2318@devnull.mpd.tandem.com> <rmartin.715001372@thor> <4192@papaya.bbn.com> <1992Sep2.131733.20676@terminator.cc.umich.edu> <rmartin.715526582@thor> <1992Sep9.205014.24925@mksol.dseg.ti.com>
  8. Sender: news@Rational.COM
  9. Lines: 35
  10.  
  11. mccall@mksol.dseg.ti.com (fred j mccall 575-3539) writes:
  12.  
  13. |In <rmartin.715526582@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  14.  
  15.  
  16. |>Now, granted, there are some cases where the rules of Structure
  17. |>Programming do not create the most efficient possible code.  And in
  18. |>cases where efficiency is of primary importance, then the rules should
  19. |>be violated, without regret.
  20.  
  21. |There are also places where the rules of Structured Programming do not
  22. |create the most READABLE or MAINTAINABLE code, either.  In these
  23. |cases, as well, they should be jettisoned.  This is the problem with
  24. |having a set of 'usual rules'.  Meeting the rules becomes more
  25. |important to some people than meeting the goals that the rules are
  26. |supposed to be helping you with.
  27.  
  28. Readability is subjective.  I find code without gotos more readable
  29. than code with gotos.  Others, like you perhaps, find gotos to be more
  30. readable in certain circumstances.  Life would be boring if we were
  31. all the same.
  32.  
  33. However, maintainability is much less subjective.  Gotos create
  34. dependencies between blocks which complicate their flow patterns.
  35. This makes them intriniscally more difficult to maintain.  Gotos also
  36. tend to be used to merge many different control flows into one.  This
  37. is also difficult to maintain since, as time wears on, exceptions
  38. accumulate in the merged flows.
  39.  
  40.  
  41. --
  42. Robert Martin                        Training courses offered in:
  43. R. C. M. Consulting                       Object Oriented Analysis
  44. 2080 Cranbrook Rd.                        Object Oriented Design
  45. Green Oaks, Il 60048 (708) 918-1004       C++
  46.