comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada 95 and Class attribute for none-tagged incomplete type
Date: Thu, 13 Aug 2009 23:21:39 -0500
Date: 2009-08-13T23:21:39-05:00	[thread overview]
Message-ID: <h62oqn$iq2$1@munin.nbi.dk> (raw)
In-Reply-To: wcc7hx7onv6.fsf@shell01.TheWorld.com

"Robert A Duff" <bobduff@shell01.TheWorld.com> wrote in message 
news:wcc7hx7onv6.fsf@shell01.TheWorld.com...
...
> The purpose of the rule is so you can create recursive types, as in:
>
> package P is
>   type Priv is private;
> private
>   type Acc is access all Priv'Class; -- Legal!!!!!!
>   type Priv is tagged
>        record
>            Next : Acc;
>            ... --etc.
>        end record;
> end P;
>
> without exposing the taggedness to clients.  Note that Acc is in the
> private part, so there's no privacy-breaking going on.

Another example of why you ought to come to meetings more often. I don't 
recall anyone figuring that out per-se (although it is obvious that you can 
use it in this way). All this special rule eliminates is the need to declare 
an incomplete type in this one unusual case (the private type in cases like 
this is best declared as tagged, so this shouldn't happen very often). Seems 
like a pile of work for an implementation and for the language just to 
eliminate one line in a private part.

                                            Randy.





  reply	other threads:[~2009-08-14  4:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-02  6:55 Ada 95 and Class attribute for none-tagged incomplete type Hibou57 (Yannick Duchêne)
2009-08-03 15:26 ` Adam Beneschan
2009-08-03 18:45   ` Dmitry A. Kazakov
2009-08-13  1:50   ` Randy Brukardt
2009-08-13  8:18     ` Niklas Holsti
2009-08-13 13:16       ` Robert A Duff
2009-08-14  4:21         ` Randy Brukardt [this message]
2009-08-14 19:01           ` Robert A Duff
2009-08-14 23:41             ` Randy Brukardt
2009-08-15 14:33               ` Robert A Duff
2009-08-14  4:17       ` Randy Brukardt
replies disabled

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