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

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!stanford.edu!EE.Stanford.EDU!sierra!mcgrant
  3. From: mcgrant@rascals.stanford.edu (Michael C. Grant)
  4. Subject: Re: GOTO, was: Tiny proposal for named loops.
  5. In-Reply-To: rmartin@thor.Rational.COM's message of 25 Aug 92 13:29:50 GMT
  6. Message-ID: <MCGRANT.92Aug25210351@rascals.stanford.edu>
  7. Sender: usenet@EE.Stanford.EDU (Usenet)
  8. Organization: Information Systems Laboratory, Stanford University
  9. References: <TSOS.61.714395736@uni-duesseldorf.de> <1992Aug21.203635.2917@alias.com>
  10.     <rmartin.714668024@thor> <2299@devnull.mpd.tandem.com>
  11.     <rmartin.714749390@thor>
  12. Date: 25 Aug 92 21:03:51
  13. Lines: 42
  14.  
  15. In article <rmartin.714749390@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  16.  
  17.    Of course, blindly applying rules is silly.  But so is being blind to
  18.    rules.  Break rules when you have a good and justifiable reason to do
  19.    so.  I.e., use gotos in the generated output of a compiler...
  20.  
  21.    |[Good Programming] has to do with programmers that recognize better
  22.    |and simpler ways of implementing things.  There might be a breed of
  23.    |untrained or inexperienced programmers for which your rules might
  24.    |serve as guidelines until they become real programmers.
  25.  
  26.    On the contrary, it is the untrained and inexperienced programmers
  27.    that typically feel that rules should be violated.  It is mature and
  28.    seasoned programmers which have learned respect for those rules.
  29.  
  30.    I am not saying that every seasoned programmer agrees with me that
  31.    'breaks' should be avoided.  I am simply saying that the more years a
  32.    programmer has under his belt, the more he understands the reasons
  33.    behind the rules, and the less often he breaks them.
  34.  
  35. I don't think it always works that way... It seems that a lot of people
  36. after their initial inexperience become overly (IMHO) dogmatic about
  37. avoiding breaks, continues, etc., and then back off somewhat from that
  38. original overenthusiasm. They then 'settle into' a set of instinctive
  39. guidelines for their effective use that are much less exclusive than
  40. you would like them to be...
  41.  
  42. I've seen similar 'cleansing' processes when one comes upon recursion
  43. and object-oriented programming for the first time... some tend to
  44. overuse these tools at first, but experience helps them define 
  45.  
  46. Certainly others have the opposite experience, as you have mentioned,
  47. but your articles have been filled with so much black and white that
  48. I felt it necessary to inject a little grey.
  49.  
  50. Perhaps this has been mentioned, but anyone interested in a less recent
  51. contribution to this debate might want to check out Donald Knuth's book
  52. _Literate Programming_ which contains a reprint of an article in which he
  53. supports limited use of goto's and similar structures.
  54.  
  55. Michael C. Grant
  56.  
  57.