comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Constraint checking of actuals passed to Attributes
Date: 2000/05/09
Date: 2000-05-09T00:00:00+00:00	[thread overview]
Message-ID: <wccitwnmi4r.fsf@world.std.com> (raw)
In-Reply-To: 8f9snr$vbr$1@nnrp1.deja.com

Robert Dewar <robert_dewar@my-deja.com> writes:

> In article <wcc4s8721fj.fsf@world.std.com>,
>   Robert A Duff <bobduff@world.std.com> wrote:
> 
> > Well, it's clear to me.  ;-)
> >
> > Apparently, it's not clear to you, but I'm not sure what to do
> > about that at this point.
> 
> You could try expressing your intent.

Well.  First of all, it's not "my" intent.  It's the intent of the
language design team (of which I was but a part), and I think I
understand that intent, but I don't entirely agree with it.  (English
suffers from not having a clear singular for "your".;-))  My job was to
help write a coherent reference manual, and only secondarily to push for
my own wishes as to the language rules.

I suppose I could try expressing the intent by example:

If you say:

    Uninit: Integer; -- Uninitialized variable!
    ...
    if Uninit < 10 then
        ...

The condition must be either True or False, or it must raise an
exception.  It must not destroy other variable's values.  Inside the
if statement, Uninit must evaluate to a value less than 10.

Obviously that's not a formal definition -- it's just an example of the
intent.

If I could give a formal definition of the intent, I would have done so
in the RM -- I didn't then, because it's hard, and it's still hard
today.  I don't think it's impossible to formalize that intent.

If you start asking me about floating-point NaN's, or holes in
rep-speced enums, I'll start hemming and hawing.  But for plain old
integers and enums, I think I kown what was "intended".

At least I can give lots of examples.  ;-)

> > I agree with you that the RM words do not precisely capture
> > the intent.
> 
> Seeing as you agree the RM words do not capture the intent, I
> guess the only way to determine the intent is to ask the
> intenders to divulge otherwise unknowable information.

Correct.  ;-)

I'm not convinced that the RM always has to be read in such a
formal way.  Sometimes (most times) it should.  But there are
some rules of the form, "nudge, nudge, you know what I mean".

- Bob




  reply	other threads:[~2000-05-09  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-05  0:00 Constraint checking of actuals passed to Attributes Matt Brennan
2000-05-05  0:00 ` Keith Thompson
2000-05-08  0:00 ` Tucker Taft
2000-05-09  0:00   ` Robert Dewar
2000-05-09  0:00     ` Robert A Duff
2000-05-09  0:00       ` Robert Dewar
2000-05-09  0:00         ` Robert A Duff [this message]
2000-05-09  0:00           ` Keith Thompson
2000-05-10  0:00             ` Robert A Duff
2000-05-14  0:00               ` Simon Wright
2000-05-17  0:00                 ` Robert A Duff
2000-05-12  0:00             ` Tucker Taft
2000-05-12  0:00               ` Ted Dennison
2000-05-12  0:00                 ` Robert A Duff
2000-05-12  0:00                   ` Ted Dennison
2000-05-16  0:00                     ` Robert A Duff
2000-05-16  0:00                       ` Ted Dennison
2000-05-17  0:00                       ` Robert Dewar
2000-05-10  0:00           ` Robert Dewar
2000-05-10  0:00             ` Robert A Duff
2000-05-15  0:00             ` Bill Greene
2000-05-10  0:00           ` David C. Hoos, Sr.
2000-05-22  0:00           ` Kenneth Almquist
2000-05-09  0:00     ` Ted Dennison
2000-05-09  0:00       ` Robert Dewar
2000-05-09  0:00         ` Ted Dennison
2000-05-09  0:00           ` Robert Dewar
2000-05-09  0:00             ` Ted Dennison
2000-05-09  0:00               ` Robert A Duff
2000-05-10  0:00   ` Matt Brennan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox