From: Alan E & Carmel J Brain <aebrain@dynamite.com.au>
Subject: Re: Building blocks (Was: Design By Contract)
Date: 1997/10/01
Date: 1997-10-01T00:00:00+00:00 [thread overview]
Message-ID: <3432CA07.3B5D@dynamite.com.au> (raw)
In-Reply-To: 343149D9.6A30@pseserv3.fw.hac.com
W. Wesley Groleau x4923 wrote:
>
> > Yes, it's quite wrong to use a flag to terminate a while loop,
> > instead of just using exit with a loop. The idiom is, use an
> > exit when the termination depends on what you read, .....
>
> Or to end a search when the item is found, or ...
>
> Unfortunately, there are those who feel that not identifying the
> loop termination at the beginning of the loop confuses the reader.
> These folk are supported by a non-thoughtful reading of Ada Quality
> and Style. The "guidelines" (we all know that's another word for
> "rules," right?) say to only exit from a plain loop, never from
> a 'while' or 'for' So folks go through wierd contortions to avoid
> "exit." But the accompanying explanation clearly says that
> _readability_ is the criteria for choosing a loop construct.
Concur. The "bottom line" is readability, that's a given (I hope..). In
this case, W. Wesley Groleau has provided pursuasive evidence that my
"while Unfinished" construct is less readable than his "exit" construct.
Although I'm not completely convinced, I am pursuaded that the "exit"
construct is superior, at least in this case.
And I thought I was a true disciple of "egoless" review. There's nothing
like having a bunch of people expose one's coding failings in public,
calmly and correctly, to show how far one has to go. Still, I've learnt
something important I didn't know before, and that's worth any amount of
ego damage. My thanks to all concerned.
--
aebrain@dynamite.com.au <> <> How doth the little Crocodile
| Alan & Carmel Brain| xxxxx Improve his shining tail?
| Canberra Australia | xxxxxHxHxxxxxx _MMMMMMMMM_MMMMMMMMM
abrain@cs.adfa.oz.au o OO*O^^^^O*OO o oo oo oo oo
By pulling MAERKLIN Wagons, in 1/220 Scale
next prev parent reply other threads:[~1997-10-01 0:00 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-09 0:00 Building blocks (Was: Design By Contract) Marc Wachowitz
1997-09-15 0:00 ` Joachim Durchholz
1997-09-17 0:00 ` Paul Johnson
1997-09-18 0:00 ` Robert Dewar
1997-09-18 0:00 ` Stephen Leake
1997-09-18 0:00 ` W. Wesley Groleau x4923
1997-09-21 0:00 ` Matthew Heaney
1997-09-18 0:00 ` Mark L. Fussell
1997-09-19 0:00 ` Robert A Duff
1997-09-20 0:00 ` Joachim Durchholz
1997-09-22 0:00 ` Matthew Heaney
1997-09-23 0:00 ` Joachim Durchholz
1997-09-23 0:00 ` Veli-Pekka Nousiainen
1997-10-03 0:00 ` Robert I. Eachus
1997-10-04 0:00 ` Paul Johnson
1997-10-14 0:00 ` Robert I. Eachus
1997-09-23 0:00 ` Jon S Anthony
1997-09-24 0:00 ` Alan E & Carmel J Brain
1997-09-25 0:00 ` Anonymous
1997-09-30 0:00 ` Alan E & Carmel J Brain
1997-09-30 0:00 ` Matthew Heaney
1997-09-30 0:00 ` W. Wesley Groleau x4923
1997-09-30 0:00 ` Matthew Heaney
1997-10-01 0:00 ` Alan E & Carmel J Brain [this message]
1997-09-30 0:00 ` Neil Wilson
1997-09-30 0:00 ` Stephen Leake
1997-10-01 0:00 ` Anonymous
1997-10-01 0:00 ` Paul M Gover
1997-10-04 0:00 ` Paul Johnson
1997-10-04 0:00 ` Matthew Heaney
1997-10-15 0:00 ` Paul Johnson
1997-10-15 0:00 ` Matthew Heaney
1997-10-16 0:00 ` Joachim Durchholz
1997-10-17 0:00 ` Robert I. Eachus
1997-10-16 0:00 ` Joachim Durchholz
1997-10-22 0:00 ` Reimer Behrends
1997-10-01 0:00 ` Joachim Durchholz
1997-10-02 0:00 ` Robert A Duff
1997-10-02 0:00 ` Tucker Taft
1997-10-02 0:00 ` Matthew Heaney
1997-10-03 0:00 ` Stephen Leake
1997-10-04 0:00 ` Matthew Heaney
1997-10-07 0:00 ` Robert A Duff
1997-09-24 0:00 ` Richard A. O'Keefe
[not found] ` <11861963wnr@eiffel.demon.co.uk>
1997-09-19 0:00 ` Mark L. Fussell
1997-09-19 0:00 ` Jon S Anthony
1997-09-23 0:00 ` Mark L. Fussell
1997-09-18 0:00 ` Jon S Anthony
-- strict thread matches above, loose matches on Subject: below --
1997-09-11 0:00 Robert Dewar
1997-09-09 0:00 Marc Wachowitz
1997-09-02 0:00 Design By Contract Jon S Anthony
[not found] ` <JSA.97Sep3201329@alexandria.organon.com>
1997-09-04 0:00 ` Paul Johnson
[not found] ` <5un58u$9ih$1@gonzo.sun3.iaf.nl>
1997-09-06 0:00 ` Building blocks (Was: Design By Contract) Joachim Durchholz
1997-09-08 0:00 ` Paul Johnson
1997-09-08 0:00 ` Brian Rogoff
1997-09-09 0:00 ` W. Wesley Groleau x4923
1997-09-09 0:00 ` Matthew Heaney
1997-09-09 0:00 ` Brian Rogoff
1997-09-09 0:00 ` W. Wesley Groleau x4923
1997-09-10 0:00 ` Robert A Duff
1997-09-12 0:00 ` Jon S Anthony
1997-09-10 0:00 ` Robert Dewar
1997-09-12 0:00 ` Jon S Anthony
1997-09-12 0:00 ` Robert Dewar
1997-09-16 0:00 ` Brian Rogoff
1997-09-12 0:00 ` Paul Johnson
1997-09-14 0:00 ` Robert Dewar
1997-09-14 0:00 ` Robert Dewar
1997-09-14 0:00 ` Robert Dewar
1997-09-15 0:00 ` John G. Volan
1997-09-10 0:00 ` Paul Johnson
1997-09-10 0:00 ` Matthew Heaney
1997-09-10 0:00 ` Darren New
1997-09-09 0:00 ` Veli-Pekka Nousiainen
1997-09-09 0:00 ` Veli-Pekka Nousiainen
1997-09-09 0:00 ` Jon S Anthony
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox