comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: D.10
Date: 1999/04/13
Date: 1999-04-13T00:00:00+00:00	[thread overview]
Message-ID: <m390bwtyna.fsf@mheaney.ni.net> (raw)
In-Reply-To: 7evc8l$pde$1@nnrp1.dejanews.com

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

> In article <m3ogkuuriu.fsf@mheaney.ni.net>,
>   Matthew Heaney <matthew_heaney@acm.org> wrote:
> > Paragraph D.10 (7) states that
> 
> Much better to define your own.

Can you give me specific advice about how to do that?  What do you mean
by "define your own"?


> Possibly your implementation might do something specially efficient
> with this package, it might also do something specially efficient with
> simple cases of protected records.

The rationale makes the argument that a suspension object is likely to
be more efficient because it is "unnecessary to maintain a queue -- a
major saving in run-time cost."  (Rat95 D.10 p. D-37 para. 6)


> Certainly GNAT just translates this into the corresponding
> protected type in a naive way, and we have never seen a
> program that used it except an ACVC test or two :-)

I learned about suspension objects from the keynote speaker at last
year's SIGAda conference, a person (I forget his name; works for Aonix
UK) involved in the formulation of the Ravenscar profile.

He said specifically that this was a feature for "close to the metal
programming", a phrase he learnt from none other than Tucker Taft.

You might think that a suspension object is "gratuitous nonsense," and
of course you are entitled to your opinion.  

However, my expectation is that the suspension object is in the language
because it admits a more efficient implementation than using a entry
queue.

For example, the programmer might be writing a program using an entry
queue that he knows will only have a maximum of one caller.  In this
case, a queue is unnecessary.


But let us waive aside any debates about whether a suspension object is
a useful language feature, and concentrate on specifics.  Is the program
in section 12.3.1 of Burns and Wellings correct, or not?









  parent reply	other threads:[~1999-04-13  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-12  0:00 D.10 Matthew Heaney
1999-04-12  0:00 ` D.10 Steve Quinlan
1999-04-12  0:00 ` D.10 James S. Rogers
1999-04-13  0:00   ` D.10 Matthew Heaney
1999-04-13  0:00     ` D.10 Robert Dewar
1999-04-13  0:00       ` D.10 Matthew Heaney
1999-04-13  0:00       ` D.10 Robert Dewar
1999-04-13  0:00         ` D.10 Matthew Heaney
1999-04-13  0:00           ` D.10 Robert A Duff
1999-04-13  0:00 ` D.10 Robert Dewar
1999-04-13  0:00   ` D.10 Robert A Duff
1999-04-13  0:00     ` D.10 Robert Dewar
1999-04-13  0:00     ` D.10 Robert Dewar
1999-04-13  0:00   ` Matthew Heaney [this message]
1999-04-13  0:00     ` D.10 Tucker Taft
1999-04-14  0:00       ` D.10 Robert Dewar
replies disabled

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