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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7d83a6223f4f2443 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Run-time accessibility checks (was: Construction initialization problem) Date: Thu, 11 Dec 2008 16:31:29 -0600 Organization: Jacob Sparre Andersen Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1229034721 8981 69.95.181.76 (11 Dec 2008 22:32:01 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 11 Dec 2008 22:32:01 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:3937 Date: 2008-12-11T16:31:29-06:00 List-Id: I said: > ... >> Because Ref_Type is not abstract, you will have to override all primitive >> operations of Target_Type, and assignment must be a primitive operation, >> and components getter/setters of, in case Target_Type were a record type, >> must be as well. > > That sounds like a maintenance headache (any change must be replicated > everywhere. That became such a pain for the Claw Builder program that it > almost ground development on it to a halt.) By the way, if you don't care about the maintenance headache, you can do this with Ada today, using interfaces. Since an interface requires all of the operations to be redefined, you get exactly this behavior as long you define both types to inherit from the interface (not each other). That is: type Something_Interface is interface; type Target_Type is new Something_Interface; type Ref_Type is new Something_Interface; I'm not sure what you need that can't be done this way. (I'm certain that no new feature is going to get added to the language if it is equivalent to what you can already do and doesn't even save much typing). Randy.