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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,29d8139471e3f53e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Preventing type extensions Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <87iq2bfenl.fsf@mid.deneb.enyo.de> <874odv9npv.fsf@ludovic-brenta.org> <87y6b7cedd.fsf@mid.deneb.enyo.de> <66a3704c-54f9-4f04-8860-aa12f516134b@t3g2000vbb.googlegroups.com> <87d3sib44t.fsf@mid.deneb.enyo.de> <134q4k2ly2pf4$.17nlv1q6q5ivo.dlg@40tude.net> <4c8dec8e$0$6990$9b4e6d93@newsspool4.arcor-online.net> <8f6cceFrv2U1@mid.individual.net> <8f97d6FobnU1@mid.individual.net> <1xjdyd281an6m$.1gymnlu3wjdcs.dlg@40tude.net> <8f9s0hFvvuU1@mid.individual.net> Date: Wed, 15 Sep 2010 10:18:11 +0200 Message-ID: <150t0nhd2nank$.1bjjoxnee181l$.dlg@40tude.net> NNTP-Posting-Date: 15 Sep 2010 10:18:05 CEST NNTP-Posting-Host: f3e53600.newsspool4.arcor-online.net X-Trace: DXC=Se3ld: On Tue, 14 Sep 2010 21:08:16 +0300, Niklas Holsti wrote: > Dmitry A. Kazakov wrote: >> On Tue, 14 Sep 2010 15:16:37 +0300, Niklas Holsti wrote: >> >>> If an operation of a parent type calls several other operations >>> with redispatching, and several derived types override these called >>> operations in diverse ways, perhaps you need to test the calling >>> operation separately for each derived class. But if I understand >>> Dmitry's standpoint correctly, he would avoid the redispatching by >>> overriding the calling operation for each derived class, giving the >>> same total number of operations to be tested, right? >> >> No, I am trying not to override non-abstract or non-null operations. > > Aha! *Now* I understand your concept. In other words, you are trying to > avoid all inheritance of behaviour and to allow only inheritance of > interfaces and perhaps of structure (components). No, I tend to override once. That is rather opposite to not inheriting. Actually I have no problem with implementation inheritance. Regarding interface inheritance I would gladly scrap ugly Ada 2005 interfaces and allow interface inheritance from any type and of course a full MI. >> I think you have a certain way of decomposition in mind. This >> decomposition is driven by the idea of re-dispatch or OOTIA's "simple >> dispatch" or, more generally, by object's identity (rather than >> contract). > > Possibly so. I have not knowingly modelled my design style on those > sources, but may have absorbed such ideas when I first learned about > object-oriented programming (and I no longer remember when that was). It wasn't Ada 95, right? As for me, I somehow missed the tide of OO hype. I just hated (and continue to hate) reading books on OO. I even didn't really use OOP in C++ until Ada 95 came, so I learned both parallel, in comparison. >> I don't like this sort of decomposition in first place. > > That is your right, and may you live long and prosper. (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de