comp.lang.ada
 help / color / mirror / Atom feed
From: Craig Carey <research@ijs.co.nz>
Subject: Re: Q: Hiding the structure of a tagged type using containers
Date: Wed, 10 May 2006 23:50:34 +1200
Date: 2006-05-10T23:50:34+12:00	[thread overview]
Message-ID: <j3k3621dufk7c5fbnrc3a5hlct45mn6aqk@4ax.com> (raw)
In-Reply-To: 1147186320.100422.245170@v46g2000cwv.googlegroups.com

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



  reply	other threads:[~2006-05-10 11:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-09  1:52 Q: Hiding the structure of a tagged type using containers brian.b.mcguinness
2006-05-09  6:43 ` Stephen Leake
2006-05-09 14:52   ` Matthew Heaney
2006-05-10 11:50     ` Craig Carey [this message]
2006-05-09 14:47 ` Matthew Heaney
2006-05-09 14:55   ` brian.b.mcguinness
replies disabled

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