From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dfb98535bcaeb3a6 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: Controlled types in local generics? Date: 1999/12/30 Message-ID: <386BB0F4.DB4FFF13@telepath.com>#1/1 X-Deja-AN: 566597609 Content-Transfer-Encoding: 7bit References: <386AFDA8.7C3110CC@telepath.com> <386B3015.F2F094CB@mail.com> X-Accept-Language: en,pdf Content-Type: text/plain; charset=us-ascii X-Complaints-To: Abuse Role , We Care X-Trace: newshog.newsread.com 946581533 216.14.8.72 (Thu, 30 Dec 1999 14:18:53 EST) Organization: Telepath Systems (telepath.com) MIME-Version: 1.0 NNTP-Posting-Date: Thu, 30 Dec 1999 14:18:53 EST Newsgroups: comp.lang.ada Date: 1999-12-30T00:00:00+00:00 List-Id: 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