Fri, 26 Sep 1997 17:28:27 -0400
At 09:31 PM 9/26/97 DST, Christoph & Ursula Grein wrote:
>A long time ago, [log in to unmask] wrote:
>> One of the main headaches this causes occurs when you already have
>> a tagged hierarchy of types. You want to derive off from it, but
>> you want the new type to have controlled behavior. There is no
>> good way to do this.
>This is wrong! You should have said: There is NO way to do this.
>I took the challenge, you know, and fought my way thru all kinds of thorny
>brushes, and finally I thought I had found a solution for the non-limited
>type, albeit only a Gnat-dependent one (you cannot use the 'Unchecked_Access
>attribute, you have to use the Gnat-defined 'Unrestricted_Access).
I will certainly agree that the realistic state of affairs is that it
is doable for limited types, but at best too difficult for even top notch
software engineers to support for non-limited types. The one case where I
tried this, and with a much earlier version of GNAT, the right solution was
to make the type limited. In fact, making the parent type limited broke
none of the existing code.
So this leaves us with an interesting question. Is this a missing
feature of the language that should be added in the next revision? Or a
feature that can be supplied by implementors in a clean integrated way? Or
something that just isn't worthwile enough to add?
Robert I. Eachus
function Message (Text: in Clever_Ideas) return Better_Ideas is...