From: "Pat Rogers" <progers@NOclasswideSPAM.com>
Subject: Re: Is there a language that Dijkstra liked? (was: Re: Software landmines (loops))
Date: 1998/10/28
Date: 1998-10-28T00:00:00+00:00 [thread overview]
Message-ID: <718lct$qk1$1@supernews.com> (raw)
In-Reply-To: udn26gxgsi.fsf@tanana.llnl.gov
John Woodruff wrote in message ...
>>>>>> "Pat" == Pat Rogers <progers@NOclasswideSPAM.com> writes:
>In article <712r19$rs5$1@supernews.com> "Pat Rogers"
<progers@NOclasswideSPAM.com> writes:
>
> > Ehud Lamm wrote in message ...
> >> On Mon, 26 Oct 1998 dennison@telepath.com wrote:
>
> > <good points all>
>
> >> Still - Remember you can achieve all the run time checking
> > functionality
> >> in any language. It is just that in some languages you have
to
> >> code
> > it
> >> explicitly. But you want your code to be of quallity - you
just
> > have to do
> >> it.
>
>
> > Explicitly coded checks come at a price, though, that
> > language-defined checks may be able to avoid. ......
>
>Another consideration occurs when the programmer offers to code his
>(her) own checks, in defense against the kind of errors that Ada's
>checking prevents:
>
> > ...... In Ada, the fact
> > that the check is defined by the language means that we don't
> > explicitly write the it ourselves, and the optimizer then has
> > freedom to help us with performance. Ironic, isn't it?
>
>The programmer is setting out to write additional code, and that
code
>itself is susceptible to some defects. Shouldn't we worry that
these
>defects injected into the *checking* code might lower the quality
of the
>product?
Yes, any "extra" code is unfortunate, since it is just that much
more that can go wrong.
One does have to be careful, though. Consider:
function Next( This : Some_Discrete_Type ) return
Some_Discrete_Type is
begin
return Some_Discrete_Type'Succ(This);
exception
when Constraint_Error =>
return Some_Discrete_Type'First;
end Next;
Although the language will check that we don't "go off the end of
the world" when This is Some_Discrete_Type'Last, if some poor
maintenance programmer comes along and suppresses the check we are
in for Trouble. In such cases the explicit, hand-coded check is
preferable, IMHO:
function Next( This : Some_Discrete_Type ) return
Some_Discrete_Type is
begin
if This = Some_Discrete_Type'Last then
return Some_Discrete_Type'First;
else
return Some_Discrete_Type'Succ(This);
end if;
end Next;
next prev parent reply other threads:[~1998-10-28 0:00 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-10-28 0:00 Is there a language that Dijkstra liked? (was: Re: Software landmines (loops)) John Woodruff
1998-10-28 0:00 ` Pat Rogers [this message]
1998-10-29 0:00 ` Ehud Lamm
-- strict thread matches above, loose matches on Subject: below --
1998-10-14 0:00 R. Kerr
1998-10-14 0:00 ` Matthew Heaney
1998-10-14 0:00 ` R. Kerr
1998-08-19 0:00 Software landmines (was: Why C++ is successful) adam
1998-08-19 0:00 ` Dan Higdon
1998-08-20 0:00 ` adam
1998-08-20 0:00 ` Software landmines (loops) Nick Leaton
1998-08-30 0:00 ` Matthew Heaney
1998-08-30 0:00 ` Robert Martin
1998-08-31 0:00 ` Andrew Hussey
1998-09-01 0:00 ` Gerry Quinn
1998-09-01 0:00 ` Robert Martin
1998-09-02 0:00 ` mfinney
1998-09-02 0:00 ` Robert Martin
1998-09-02 0:00 ` Ell
1998-09-02 0:00 ` Robert Martin
1998-09-02 0:00 ` Ell
1998-09-02 0:00 ` Robert Martin
1998-09-02 0:00 ` Ell
1998-09-02 0:00 ` Robert Martin
1998-09-03 0:00 ` Joe Gwinn
1998-09-06 0:00 ` Charles Hixson
1998-09-08 0:00 ` adam
1998-09-09 0:00 ` Gerry Quinn
[not found] ` <gio+van+no+ni+8-1609980034390001@dialup26.tlh.talstar.com>
1998-09-16 0:00 ` Biju Thomas
1998-09-16 0:00 ` Is there a language that Dijkstra liked? (was: Re: Software landmines (loops)) Rick Smith
1998-09-17 0:00 ` Markus Kuhn
1998-09-17 0:00 ` dewarr
1998-09-17 0:00 ` Biju Thomas
1998-09-18 0:00 ` dewarr
1998-09-18 0:00 ` Markus Kuhn
1998-10-09 0:00 ` Matthew Heaney
1998-10-09 0:00 ` Pat Rogers
1998-10-09 0:00 ` Jay Martin
1998-10-09 0:00 ` Pat Rogers
1998-10-10 0:00 ` Dave Wood
1998-10-13 0:00 ` last.first
1998-10-23 0:00 ` Brian Mueller
1998-10-23 0:00 ` Ell
1998-10-23 0:00 ` Arun Mangalam
1998-10-23 0:00 ` DPH
1998-10-24 0:00 ` Michael Stark
1998-10-23 0:00 ` midlamD
1998-10-23 0:00 ` Ell
1998-10-24 0:00 ` Dale Stanbrough
1998-10-24 0:00 ` Ehud Lamm
1998-10-24 0:00 ` Dave Wood
1998-10-24 0:00 ` Tucker Taft
1998-10-24 0:00 ` Dave Wood
1998-10-26 0:00 ` Bill Ghrist
1998-10-27 0:00 ` Ell
1998-10-27 0:00 ` dewarr
1998-10-23 0:00 ` Gautier.DeMontmollin
1998-10-11 0:00 ` Bertrand Meyer
1998-10-12 0:00 ` Pat Rogers
1998-10-12 0:00 ` Rod Chapman
1998-10-13 0:00 ` Robert I. Eachus
1998-09-17 0:00 ` Pat Rogers
1998-09-17 0:00 ` David C. Hoos, Sr.
1998-09-17 0:00 ` dewarr
1998-09-18 0:00 ` bengt
1998-10-09 0:00 ` Gautier.DeMontmollin
1998-10-21 0:00 ` Van Snyder
1998-10-22 0:00 ` biocyn
1998-10-26 0:00 ` Ehud Lamm
1998-10-26 0:00 ` Tucker Taft
1998-10-26 0:00 ` dennison
1998-10-26 0:00 ` Ehud Lamm
1998-10-26 0:00 ` Pat Rogers
1998-10-27 0:00 ` dennison
1998-10-27 0:00 ` Dave Wood
1998-10-28 0:00 ` norm
1998-10-27 0:00 ` bill
1998-10-27 0:00 ` dewarr
1998-10-27 0:00 ` Ehud Lamm
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox