comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Semantic info pragmas (was: should I be interested in ada?)
Date: 1999/03/01
Date: 1999-03-01T00:00:00+00:00	[thread overview]
Message-ID: <wccvhgl9mxn.fsf@world.std.com> (raw)
In-Reply-To: 87hfs5juyx.fsf@zaphod.enst.fr

Samuel Tardieu <sam@ada.eu.org> writes:

> >>>>> "Nick" == Nick Roberts <Nick.Roberts@dial.pipex.com> writes:
> 
> Nick> RM95 2.8(16) states "Normally, implementation-defined pragmas
> Nick> should have no semantic effect for error-free programs; ...," so
> Nick> I should have said 'shouldn't' rather than 'can't'.  I think
> Nick> this is an area where there would be no good excuse for
> Nick> introducing implementation-defined pragmas which did change the
> Nick> semantics.

There's an important difference between "shouldn't" and "can't".

A bit of history: During the language design, Tucker wanted to put in a
"shall" rule along the lines of the above.  I wanted to leave it out,
and rely on implementer's "good taste" to prevent really awful pragmas.
We argued strongly, and eventually compromised on putting in the rule,
but weakening it by labelling it "Implementation Advice", and using
"should".  That compromise was unusual -- for most design decisions, we
either agreed, or kept arguing until we did agree.  ;-)

(I don't think you can capture "good taste" in a rule.  But as a
guideline, I think pragmas shouldn't have a "strong" effect on the
semantics of working programs, whatever that means.  A pragma that
restricts is usually in good taste.)

> "Normally" means "except where specified", right? Because pragma
> Asynchronous certainly does change the semantics of a procedure call
> in regard with exceptions.

I wrote "Normally" deliberately to further weaken the rule.  I meant it
to indicate that there are perfectly reasonable pragmas that would
violate the rule.

Asynchronous is an interesting example:

During the language design, we had a meta-rule: any feature we put in
one of the optional annexes had to be something that a compiler vendor
could have "legally" added to the language as an implementation-defined
feature.  So in the optional annexes, you will find pragmas, attributes,
packages, and some nailing-down of semantics that is looser in the core
language.  You will certainly not find any new syntax.

Anyway, given the meta-rule, we had to construct the rules about pragmas
to allow us to do what we wanted in the optional annexes.

Actually, I think pragma Asynchronous is kind of in bad taste.  It has
such a strong effect on procedure-call semantics that I think it
deserves its own syntax.  But we wanted to put it in the optional annex,
so our hands were tied (by ourselves, to some extent!).

- Bob
-- 
Change robert to bob to get my real email address.  Sorry.




  reply	other threads:[~1999-03-01  0:00 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-14  0:00 should I be interested in ada? Phillip Helbig
1999-02-15  0:00 ` Gautier
1999-02-15  0:00 ` Marin David Condic
1999-02-23  0:00   ` David Starner
1999-02-16  0:00 ` Ken Thomas
1999-02-17  0:00   ` Nick Roberts
1999-02-18  0:00     ` robert_dewar
1999-02-18  0:00       ` Nick Roberts
1999-02-18  0:00         ` William Clodius
1999-02-18  0:00           ` nabbasi
1999-02-18  0:00             ` robert_dewar
1999-02-18  0:00           ` robert_dewar
1999-02-19  0:00             ` William Clodius
1999-02-19  0:00               ` Nick Roberts
1999-02-20  0:00                 ` robert_dewar
1999-02-22  0:00                   ` Nick Roberts
1999-02-22  0:00                     ` William Clodius
1999-02-23  0:00                     ` robert_dewar
1999-02-23  0:00                       ` Nick Roberts
1999-02-22  0:00                 ` William Clodius
1999-02-23  0:00                   ` Nick Roberts
1999-02-23  0:00                     ` William Clodius
1999-02-25  0:00                       ` Nick Roberts
1999-02-25  0:00                         ` robert_dewar
1999-02-23  0:00               ` Robert I. Eachus
1999-02-24  0:00                 ` William Clodius
1999-02-24  0:00                 ` Nick Roberts
1999-02-26  0:00                   ` Robert A Duff
1999-02-27  0:00                     ` Semantic info pragmas (was: should I be interested in ada?) Nick Roberts
1999-03-01  0:00                       ` Samuel Tardieu
1999-03-01  0:00                         ` Robert A Duff [this message]
1999-02-24  0:00               ` should I be interested in ada? William Clodius
1999-02-25  0:00                 ` Nick Roberts
1999-02-25  0:00                   ` robert_dewar
1999-02-26  0:00                     ` Nick Roberts
1999-02-18  0:00         ` Jerry Petrey
1999-02-18  0:00           ` fraser
1999-02-19  0:00             ` Matthew Heaney
1999-02-20  0:00               ` fraser
1999-02-18  0:00           ` Nick Roberts
1999-02-18  0:00             ` Joel Seidman
1999-02-18  0:00             ` Dan Nagle
1999-02-18  0:00               ` nabbasi
1999-02-19  0:00               ` Nick Roberts
1999-02-19  0:00                 ` Dan Nagle
1999-02-19  0:00                   ` robert_dewar
1999-02-19  0:00                     ` Dan Nagle
1999-02-19  0:00                     ` Nick Roberts
1999-02-23  0:00                     ` Peter Hermann
1999-02-19  0:00                 ` robert_dewar
1999-02-19  0:00                   ` Nick Roberts
1999-02-19  0:00                     ` William Clodius
1999-02-20  0:00                       ` Nick Roberts
1999-02-21  0:00                         ` robert_dewar
1999-02-21  0:00                           ` William Clodius
1999-02-22  0:00                           ` Nick Roberts
1999-02-19  0:00                     ` robert_dewar
1999-02-21  0:00                       ` William Clodius
1999-02-23  0:00                         ` Robert I. Eachus
1999-02-18  0:00         ` robert_dewar
1999-02-19  0:00           ` Nick Roberts
1999-02-19  0:00             ` robert_dewar
1999-02-19  0:00               ` dennison
1999-02-19  0:00                 ` Nick Roberts
1999-02-20  0:00                   ` robert_dewar
1999-02-22  0:00                     ` Nick Roberts
1999-02-19  0:00                 ` robert_dewar
1999-02-19  0:00                 ` William Clodius
1999-02-19  0:00               ` Phillip Helbig
1999-02-19  0:00               ` Nick Roberts
1999-02-20  0:00                 ` robert_dewar
1999-02-20  0:00                   ` Steve Doiel
1999-02-20  0:00                 ` robert_dewar
1999-02-22  0:00                   ` dennison
1999-02-22  0:00                   ` Nick Roberts
1999-02-23  0:00                     ` Robert I. Eachus
1999-02-24  0:00                       ` White rabbit (was: should I be interested in ada?) dennison
1999-02-25  0:00                       ` Alice books " JP Thornley
1999-02-25  0:00                         ` Robert I. Eachus
1999-02-19  0:00               ` should I be interested in ada? William Clodius
1999-02-18  0:00     ` robert_dewar
1999-02-18  0:00       ` Nick Roberts
1999-02-18  0:00         ` William Clodius
1999-02-18  0:00           ` dennison
1999-02-20  0:00 ` Hartmut H. Schaefer
1999-02-20  0:00   ` bill
1999-02-21  0:00     ` dewar
1999-02-21  0:00   ` dewar
1999-02-22  0:00     ` dennison
replies disabled

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