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,5c89acd494ea9116 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed01.chello.at!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Self pointer in limited record From: Georg Bauhaus In-Reply-To: <1183631754.917400.257350@n2g2000hse.googlegroups.com> References: <1183577468.034566.57830@n60g2000hse.googlegroups.com> <1183631754.917400.257350@n2g2000hse.googlegroups.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1183634060.27307.3.camel@kartoffel> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Date: Thu, 05 Jul 2007 13:14:20 +0200 Organization: Arcor NNTP-Posting-Date: 05 Jul 2007 13:13:45 CEST NNTP-Posting-Host: dfafb24c.newsspool2.arcor-online.net X-Trace: DXC=P90PEPBNUOEX36K@\WTHGJA9EHlD;3YcB4Fo<]lROoRAgUcjd<3m<;BD<=Jh[b_HGC=kbmW`a1fGGC`2T@AUZfCKNXT On Thu, 2007-07-05 at 03:35 -0700, Maciej Sobczak wrote: > On 5 Lip, 10:22, "Dmitry A. Kazakov" > wrote: > OK, makes sense. I have seen it used with rendezvous and I guess the > motivation was similar. > > > 2. to re-dispatch from primitive operations: > > > > type T_Access is access all T'Class; -- Note 'Class > > type T is new Ada.Finalization.Limited_Controlled with record > > Self : T_Access := T'Unchecked_Access; > > > > Both defeat the type system in some sense and potentially indicate a > > design problem. > > I have seen it applied *regularly* in some Ada project, so it looked > like "default" idiom for OO programming. Hm, is this because programmers have liked to be able to manipulate the object not via its interfaces and proper command/query separation, but instead via direct access provided by a this/self-pointer?