comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Future Ada language revisions?
Date: 1998/10/29
Date: 1998-10-29T00:00:00+00:00	[thread overview]
Message-ID: <wccg1c8ky51.fsf@world.std.com> (raw)
In-Reply-To: Pine.BSF.4.05.9810212137240.17208-100000@shell5.ba.best.com

Brian Rogoff <bpr@shell5.ba.best.com> writes:

> I take it that you've changed your mind then, since you were the author
> of the "limited access to subprogram" proposal, and at the end of that 
> proposal you had recommended that it not be adopted. What changed your
> mind?

I dunno.  I guess at the time I was mainly worried about gaining the
concensus needed to standardize Ada 9X, and that required that we not
place too much burden on those implementations that had already chosen
the display approach for Ada 83.  From a purely technical point of view,
I have always thought that Ada 9X should allow passing nested procedures
as parameters to unnested procedures.  The two workarounds I know of
(using generics, and making an explicit closure using tagged types)
are somewhat ugly, IMHO.

I suppose I won't be truly satisfied until I can pass an unnamed block
(written in line) as a parameter, like I can in Smalltalk.  Sigh.

GNAT supports the 'Unrestricted_Access attribute, which can be used to
pass nested procedures.  Unfortunately, this attribute allows dangling
pointers.  I would much prefer one of the two proposals I mentioned
before, since they gave the same power, but with no dangling pointers
(compile-time-checked for the limited access-to-subp idea, and run-time
checked for the other one).

> I have mixed feelings; on one hand I *really* wish that Ada had this
> feature, on the other I think that penalizing implementors who used
> displays wouldn't have been such a good idea. If there is a future
> enhanced Ada, this is one of those things that I hope makes it in there,
> so I hope all implementors are at least looking at it now so the argument
> of "too much change in too little time" no longer applies.

GNAT uses the "trampoline" mechanism, and I think most other Ada 95
compilers use the static link mechanism, both of which easily support
downward closures.  Of course, even compilers that choose to use
displays can support downward closures; it's just a bit more
complicated.  I've used Pascal compilers that used closures, and fully
supported Pascal's procedures-as-parameters feature.

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




  parent reply	other threads:[~1998-10-29  0:00 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-21  0:00 Future Ada language revisions? Van Snyder
1998-10-22  0:00 ` Robert A Duff
1998-10-21  0:00   ` Brian Rogoff
1998-10-23  0:00     ` Robert I. Eachus
1998-10-29  0:00     ` Robert A Duff [this message]
1998-10-30  0:00       ` Brian Rogoff
  -- strict thread matches above, loose matches on Subject: below --
1998-09-27  0:00 bpr5549
1998-09-27  0:00 ` Larry Kilgallen
1998-09-27  0:00   ` Brian Rogoff
1998-09-28  0:00     ` Michael F Brenner
1998-09-28  0:00       ` dewarr
1998-09-28  0:00     ` dewarr
1998-09-28  0:00       ` Brian Rogoff
1998-09-29  0:00         ` Larry Kilgallen
1998-09-29  0:00         ` Michael F Brenner
1998-10-02  0:00           ` Fergus Henderson
1998-09-28  0:00   ` Arthur Evans Jr
1998-09-28  0:00     ` dewarr
1998-09-28  0:00 ` dewar
1998-10-05  0:00   ` Alfred Hilscher
1998-10-05  0:00     ` Tucker Taft
1998-10-05  0:00     ` dewarr
1998-10-06  0:00       ` Alfred Hilscher
1998-10-05  0:00     ` Brian Rogoff
1998-10-05  0:00       ` dewarr
1998-10-02  0:00 ` Robert I. Eachus
1998-10-03  0:00   ` Brian Rogoff
1998-10-05  0:00     ` dewarr
1998-10-04  0:00       ` Brian Rogoff
1998-10-05  0:00         ` Martin Dowie
1998-10-05  0:00           ` dewarr
1998-10-05  0:00           ` Niklas Holsti
1998-10-05  0:00             ` Martin Dowie
1998-10-06  0:00           ` r_barton1
1998-10-06  0:00           ` dennison
1998-10-06  0:00           ` dennison
1998-10-06  0:00             ` dewarr
1998-10-06  0:00               ` Martin Dowie
1998-10-06  0:00             ` Martin Dowie
1998-10-06  0:00         ` Matthew Heaney
1998-10-06  0:00     ` Robert I. Eachus
1998-10-06  0:00       ` Brian Rogoff
1998-10-07  0:00       ` dewarr
     [not found] ` <tgmF02yDo.A84@netcom.com>
1998-10-06  0:00   ` Matthew Heaney
1998-10-08  0:00 ` dennison
1998-10-08  0:00   ` Brian Rogoff
1998-10-09  0:00     ` dennison
1998-10-08  0:00   ` Pat Rogers
1998-10-16  0:00   ` Robert A Duff
replies disabled

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