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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8054919d7e55838b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail From: Craig Carey Newsgroups: comp.lang.ada Subject: Re: Q: Hiding the structure of a tagged type using containers Date: Wed, 10 May 2006 23:50:34 +1200 Organization: Ihug Ltd Message-ID: References: <1147139575.425825.290860@u72g2000cwu.googlegroups.com> <1147186320.100422.245170@v46g2000cwv.googlegroups.com> NNTP-Posting-Host: 203-118-181-113.bliink.ihug.co.nz Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: lust.ihug.co.nz 1147261810 32088 203.118.181.113 (10 May 2006 11:50:10 GMT) X-Complaints-To: abuse@ihug.co.nz NNTP-Posting-Date: Wed, 10 May 2006 11:50:10 +0000 (UTC) X-Newsreader: Forte Agent 3.1/32.783 Xref: g2news2.google.com comp.lang.ada:4173 Date: 2006-05-10T23:50:34+12:00 List-Id: On 9 May 2006 07:52:00 -0700, "Matthew Heaney" wrote: >Stephen Leake wrote: >> brian.b.mcguinness@lmco.com writes: ... >We debated this during the design of the container library, and The debating forum got boycotted ... but too late, IBM France and Jim Moore and etc. and whomever were taking months to get discussion e-mails if at all. >concluded that we might as well make the type tagged, since the most >likely implementation Rather than, say. actual implementations that browsers could promptly access. There is one here: http://terratope.tigris.org/source/browse/terratope/trunk/cy/cc/tope/tp-m1.ads Were's you the man talking about the politics of US gangsters?. > would be that container types privately derive >from Controlled. Would be that tagged were tried and after some effort, finally abandonded with a finding that they seem useless > Making the container types publicly tagged then gives >you other benefits Such as having nearly zero heavyweight users... > such as as implicit aliasing of subprogram >parameters and distinguished-receiver syntax. > That is a major matter but a way to fix it is have absolutely no reference manual guarantee of aliasing and just note that the GNAT compiler uses by-references pointers anyway. Did you or Taft of arg@ada-auth.org really get to discover what the problems are with an aliased type, or the adding of an "aliased" keyword to the parameter list ?. >The solution in this case is to implement the full view of type >APL_Shape as a non-tagged record, with a vector component. My solution is to use enumerated types in records that did not implement a variant, but merely differentiated between different heaps for different CPUs, and use unchecked pointer conversion. In my opinion tagged types (ie. O.O.) are seriously outmatered by the competition of nested records, and of course there would be some record flattening syntax (without and any hidden tag discriminant) and beyond all reasonable doubt, Dewar's Ada still does not have such. Craig Carey