From: malaise@magic.fr
Subject: Re: Extending a type and Finalization
Date: Fri, 5 Jun 2009 06:32:01 -0700 (PDT)
Date: 2009-06-05T06:32:01-07:00 [thread overview]
Message-ID: <49d6de3e-7a5a-4e0f-8422-35b625cf9be0@a7g2000yqk.googlegroups.com> (raw)
In-Reply-To: eb522e5b-6366-4523-9ec0-bac08bf23f69@z14g2000yqa.googlegroups.com
On 5 juin, 15:14, Ludovic Brenta <ludo...@ludovic-brenta.org> wrote:
> Pascal Malaise wrote on comp.lang.ada:
>
> > Thank you Ludovic. Solution 2 is fine for me.
>
> > Concerning your recommendation, I think that the following is
> > compliant, or did I misunderstand something?
> > type T is new Ada.Finalization.Controlled with record
> > I : Integer;
> > end record;
> > end P;
>
> No, that complies with Dmitry's recommendation but not with mine or
> Jeffrey's. I prefer and recommend composition unless there is a
> compelling reason to use type extension. Adam's post earlier in this
> thread describes the composition approach.
>
> --
> Ludovic Brenta.
I need to make visible that T is an extension of Controlled (as we
have seen earlier).
I want to hide, make private, the component I of T.
So the only solution I see is (but this is not a complelling reason):
type T is new Ada.Finalization.Controlled with private;
private
type T is new Ada.Finalization.Controlled with record
I : Integer;
end record;
next prev parent reply other threads:[~2009-06-05 13:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-04 17:45 Extending a type and Finalization pascal.malaise
2009-06-04 18:00 ` Hibou57 (Yannick Duchêne)
2009-06-04 19:33 ` Adam Beneschan
2009-06-04 20:06 ` Dmitry A. Kazakov
2009-06-04 21:18 ` Adam Beneschan
2009-06-05 9:11 ` Dmitry A. Kazakov
2009-06-05 14:48 ` Adam Beneschan
2009-06-05 17:15 ` Dmitry A. Kazakov
2009-06-05 11:29 ` malaise
2009-06-05 12:21 ` Ludovic Brenta
2009-06-05 13:02 ` malaise
2009-06-05 13:14 ` Ludovic Brenta
2009-06-05 13:32 ` malaise [this message]
2009-06-15 6:30 ` AdaMagica
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox