comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: Array of Variant Records Question...
Date: 1999/09/09
Date: 1999-09-09T00:00:00+00:00	[thread overview]
Message-ID: <37D7B099.8C1A5CC6@averstar.com> (raw)
In-Reply-To: 37d74dea@eeyore.callnetuk.com

Nick Roberts wrote:
> 
> The flaw is that Ada has no 'polymorphic array type': an array that has an
> indefinite component subtype.
> 
> As I suggested in a post a few months ago, such an array type would be easy
> to add to Ada's existing syntax, easy and efficient to implement (as an
> array of pointers plus a ragged sequence of objects, internally), and very
> bloody useful, pardon the language. (It would have solved Bruce's problem in
> a trice.)

We considered full support for "indefinite"/unconstrained subtypes
during the Ada 9X process, but ultimately decided to avoid any
language feature that would require implicit levels of indirection
within an object.  The general philosophy here is that levels of indirection
should be under the control of the programmer, not the compiler.
You can certainly create a structure much like what you propose by
an array of pointers, initialized with a sequence of allocators.
The benefits from building such a capability into the language
itself would probably not justify the added complexity, particularly
when you consider the fine level of representation control Ada programmers
desire over data structures.

> 
> Maybe come the next review...

If you have a detailed proposal with examples, ACVC tests, etc., feel free
to document it.  However, don't hold your breath for this to happen,
since (at least as far as I understand it) does not seem to be providing
significant new capability that cannot be programmed already using
existing features.
> 
> -------------------------------------
> Nick Roberts
> http://www.adapower.com/lab/adaos
> -------------------------------------
> 
> Mike Silva <mjsilva@jps.net> wrote in message
> news:eExB3.6$ZR.1146@news.wenet.net...
> | I didn't get it -- what is the flaw?  What would be the "proper" solution
> to
> | remove the flaw?

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




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

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-08  0:00 Array of Variant Records Question Bruce Detter
1999-09-08  0:00 ` Ted Dennison
1999-09-08  0:00 ` Matthew Heaney
1999-09-08  0:00   ` Mike Silva
1999-09-08  0:00     ` Matthew Heaney
1999-09-09  0:00       ` Robert Dewar
1999-09-09  0:00         ` Matthew Heaney
1999-09-09  0:00           ` Matthew Heaney
1999-09-09  0:00             ` Mark Lundquist
1999-09-09  0:00             ` Robert Dewar
1999-09-09  0:00           ` Robert Dewar
1999-09-09  0:00             ` Matthew Heaney
1999-09-10  0:00               ` Mark Lundquist
1999-09-10  0:00                 ` Matthew Heaney
1999-09-11  0:00                 ` Robert Dewar
1999-09-10  0:00               ` Robert Dewar
1999-09-10  0:00                 ` Mark Lundquist
1999-09-10  0:00                   ` Matthew Heaney
1999-09-11  0:00                     ` Jean-Pierre Rosen
1999-09-14  0:00                     ` "cast away const" (was Re: Array of Variant Records Question...) Mark Lundquist
     [not found]                     ` <wccd7viiv59.fsf@world.std.com>
1999-09-22  0:00                       ` Array of Variant Records Question Robert I. Eachus
     [not found]                       ` <7rrmqd$l89@drn.newsguy.com>
     [not found]                         ` <wcciu59n2uf.fsf@world.std.com>
1999-09-22  0:00                           ` Robert I. Eachus
1999-09-23  0:00                             ` Robert Dewar
1999-09-23  0:00                               ` Robert I. Eachus
1999-09-11  0:00               ` Richard D Riehle
1999-09-13  0:00                 ` Hyman Rosen
1999-09-14  0:00                 ` Mark Lundquist
     [not found]                   ` <7roohh$s6r@dfw-ixnews7.ix.netcom.com>
     [not found]                     ` <37e01168@news1.prserv.net>
     [not found]                       ` <7rp86o$c6h@dfw-ixnews3.ix.netcom.com>
     [not found]                         ` <37E18CC6.C8D431B@rational.com>
     [not found]                           ` <7rs8bn$s6@dfw-ixnews4.ix.netcom.com>
     [not found]                             ` <37e2e58c@news1.prserv.net>
1999-09-22  0:00                               ` 'constant functions' and access constant params (was Re: Array of Variant Records Question...) Richard D Riehle
1999-09-22  0:00                                 ` Matthew Heaney
1999-09-22  0:00                                   ` Richard D Riehle
1999-09-22  0:00                                     ` Matthew Heaney
1999-09-22  0:00                                     ` Matthew Heaney
1999-09-23  0:00                                       ` Vincent Marciante
1999-09-23  0:00                                         ` Matthew Heaney
1999-09-24  0:00                                       ` Robert A Duff
1999-09-25  0:00                                         ` Matthew Heaney
1999-09-27  0:00                                       ` Richard D Riehle
1999-09-27  0:00                                         ` David Kristola
1999-09-27  0:00                                       ` Richard D Riehle
1999-09-23  0:00                                     ` Robert Dewar
1999-09-27  0:00                                       ` Richard D Riehle
1999-09-28  0:00                                         ` Robert Dewar
1999-09-28  0:00                                           ` "Competence" (was: 'constant functions' and access constant params) Ted Dennison
1999-09-28  0:00                                             ` Robert Dewar
1999-09-28  0:00                                         ` 'constant functions' and access constant params (was Re: Array of Variant Records Question...) Robert Dewar
1999-09-28  0:00                                           ` Richard D Riehle
1999-09-29  0:00                                             ` Robert A Duff
1999-09-29  0:00                                             ` Robert Dewar
1999-09-22  0:00                                 ` Mark Lundquist
1999-09-22  0:00                                   ` Mark Lundquist
     [not found]                             ` <wccemfxn15s.fsf@world.std.com>
1999-09-22  0:00                               ` Richard D Riehle
1999-09-09  0:00             ` Array of Variant Records Question Brian Rogoff
1999-09-13  0:00               ` Matthew Heaney
1999-09-13  0:00                 ` Robert A Duff
1999-09-13  0:00                   ` Matthew Heaney
1999-09-13  0:00                 ` Brian Rogoff
1999-09-14  0:00                   ` Robert Dewar
1999-09-14  0:00                     ` Brian Rogoff
1999-09-14  0:00                   ` Robert Dewar
1999-09-10  0:00             ` Proposed Ada features (was Re: Array of Variant Records Question...) Mark Lundquist
1999-09-10  0:00               ` Matthew Heaney
1999-09-10  0:00                 ` tmoran
1999-09-09  0:00     ` Array of Variant Records Question Nick Roberts
1999-09-09  0:00       ` Tucker Taft [this message]
1999-09-10  0:00         ` Nick Roberts
1999-09-09  0:00       ` Robert Dewar
1999-09-08  0:00 ` Martin C. Carlisle
1999-09-08  0:00 ` Thank you Bruce Detter
1999-09-08  0:00   ` Martin C. Carlisle
replies disabled

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