home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!iphasew!igor!thor!rmartin
- From: rmartin@thor.Rational.COM (Bob Martin)
- Newsgroups: comp.lang.c++
- Subject: Re: GOTO, was: Tiny proposal for named loops.
- Message-ID: <rmartin.716170143@thor>
- Date: 11 Sep 92 00:09:03 GMT
- 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>
- Sender: news@Rational.COM
- Lines: 33
-
- mccall@mksol.dseg.ti.com (fred j mccall 575-3539) writes:
-
- |In <rmartin.715618743@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
-
- |Sorry, but that's hardly the reason. Where is the 'coupling' or the
- |difficulty in maintenance when goto is used for things like error
- |handling or error returns?
-
- The coupling is between the error condition, and the error processing.
- The error processing control flow is merged with the separate control
- flows which detect the error.
-
- These merged control flows get difficult to maintain over time,
- because new error conditions arise which need to be handled in almost
- the same way, but with a few exceptions. These exceptions accumulate
- in the merged code, and it eventually turns into a nightmare until
- someone undoes all the gotos and separates all the error processing.
-
- |>The last thing I advocate is a reduction of all code to one linear
- |>stream of sequence, selection and repetition.
-
- |But that is exactly your rataionale for why structured programming
- |'works'; that it is possible to implement anything using sequence,
- |selection, and repetition.
-
- I should add 'procedure call' to that list. Or perhaps method
- invocation.
-
- --
- Robert Martin Training courses offered in:
- R. C. M. Consulting Object Oriented Analysis
- 2080 Cranbrook Rd. Object Oriented Design
- Green Oaks, Il 60048 (708) 918-1004 C++
-