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