comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: Controlled types in local generics?
Date: 1999/12/30
Date: 1999-12-30T00:00:00+00:00	[thread overview]
Message-ID: <386BB0F4.DB4FFF13@telepath.com> (raw)
In-Reply-To: 386B3015.F2F094CB@mail.com

Mats Weber wrote:

> Yes, all controlled types must be library level. This is very
> unfortunate in my opinion.
>

Holy fatal flaws, Batman!

> The rule is not that all controlled types must be library level, but
> that a derived tagged type cannot be nested deeper than its parent.
> Ada.Finalization.Controlled is at library level, which implies that all
> controlled types also must be.

Ahh that makes more sense. But it still seems like a bad thing. I there a
reason why this restriction is a good thing for controlled types, or is it
purely an artifact of they way they are defined?

> Maybe this could be circumvented by a generic package similar to
> Ada.Finalization that could be instantiated locally and provide the same
> facilities as Ada.Finalization ?

That sound like the way Ada.Finalization should have been defined in the
first place. I hope something like that makes its way into the next language
revision.

> Would it be feasible to write such a package for GNAT ?

Perhaps. But I'm doing this for OpenToken, which needs to be
compiler-portable.

--
T.E.D.

Home - mailto:dennison@telepath.com  Work - mailto:dennison@ssd.fsi.com
WWW  - http://www.telepath.com/dennison/Ted/TED.html  ICQ  - 10545591






  reply	other threads:[~1999-12-30  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-30  0:00 Controlled types in local generics? Ted Dennison
1999-12-30  0:00 ` Robert Dewar
1999-12-30  0:00   ` Ted Dennison
1999-12-31  0:00     ` Robert Dewar
1999-12-31  0:00       ` Ted Dennison
1999-12-30  0:00 ` Mats Weber
1999-12-30  0:00   ` Ted Dennison [this message]
1999-12-30  0:00   ` Robert Dewar
1999-12-30  0:00 ` Florian Weimer
1999-12-30  0:00 ` Robert Dewar
1999-12-30  0:00   ` Gautier
1999-12-30  0:00     ` Ted Dennison
1999-12-30  0:00 ` Simon Wright
replies disabled

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