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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,309015504ed37ff0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-30 14:46:23 PST Path: archiver1.google.com!news2.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!wn14feed!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail Message-ID: <3F79F996.3020500@comcast.net> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Usage of Interfaces with Ada 95 References: <1064595326.831730@master.nyc.kbcfp.com> <4nii41-067.ln1@boavista.snafu.de> <3F7726E4.6040402@comcast.net> <3F78F430.1070909@comcast.net> <1064929111.851223@master.nyc.kbcfp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.34.139.183 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc51.ops.asp.att.net 1064958382 24.34.139.183 (Tue, 30 Sep 2003 21:46:22 GMT) NNTP-Posting-Date: Tue, 30 Sep 2003 21:46:22 GMT Organization: Comcast Online Date: Tue, 30 Sep 2003 21:46:22 GMT Xref: archiver1.google.com comp.lang.ada:39 Date: 2003-09-30T21:46:22+00:00 List-Id: Hyman Rosen wrote: > Let me see if I have this right. I believe that in Ada, controlled > types can be declared only at library level, correct? So if the > mix-in is going to do something with its containing object, then > doesn't the type of the containing object have to be declared at > library level as well? This means that the awkward inheritance-based > model of controlled drives the package structure, which seems like a > bad idea to me. There are only two times I tend to put type declarations inside procedures: In small examples where it is nice to be able to tell someone to compile a file and run it, and when the main procedure is a manager for a complex application, and I need to enumerate the parts: type Pass is (Syntax_Analysis, Semantic_Analysis, Optimizer, Code_Generation); So other than trivial examples, ALL tagged types I create are at the library level. It doesn't matter if the package containing the is nested six deep within other packages, as long as the outermost package is at the library level, all the nested packages are also. -- Robert I. Eachus "Quality is the Buddha. Quality is scientific reality. Quality is the goal of Art. It remains to work these concepts into a practical, down-to-earth context, and for this there is nothing more practical or down-to-earth than what I have been talking about all along...the repair of an old motorcycle." -- from Zen and the Art of Motorcycle Maintenance by Robert Pirsig