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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,565ee1c43df7874f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-11 16:49:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!sn-xit-05!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: array of operations Date: Wed, 11 Sep 2002 18:43:29 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3D7E0EB1.2070708@attbi.com> <7vfzwh9dkl.fsf@vlinux.voxelvision.no> X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:28839 Date: 2002-09-11T18:43:29-05:00 List-Id: Ehud Lamm wrote in message ... > >"Ole-Hjalmar Kristensen" wrote in message >news:7vfzwh9dkl.fsf@vlinux.voxelvision.no... > >> Or a pointer to an object and let the dispatching mechanism implement >> the function pointer behind the scenes. > >This indeed another useful technique. However, there are some small gotchas. >You can usually use singleton objects, but in many cases you will need >access values so you have to make them "aliased." Not true. Since it is always OK to take 'Unchecked_Access of a parameter of a tagged type in Ada 95, you generally do not need to explicitly use "aliased". Claw uses this extensively to provide an interface which is mostly without access types, yet internally everything is linked together. (Claw uses finalization to prevent dangling pointers in this case). There are very few 'aliased' tagged objects in the Claw sample programs (3 in 74 samples). Randy Brukardt.