From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd40601768eaf8fd X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: Array of Variant Records Question... Date: 1999/09/09 Message-ID: <37D7B099.8C1A5CC6@averstar.com>#1/1 X-Deja-AN: 522937427 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <7r5vh3$imu1@svlss.lmms.lmco.com> <37d6a45c@news1.prserv.net> <37d74dea@eeyore.callnetuk.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-09-09T00:00:00+00:00 List-Id: 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 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