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.7 required=5.0 tests=BAYES_00,REPLYTO_WITHOUT_TO_CC, YOU_INHERIT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,5af5c381381ac5a7 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,BIG5 Path: g2news2.google.com!news4.google.com!feeder.news-service.com!kanaga.switch.ch!switch.ch!news.belwue.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada requires too much typing! Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Sun, 6 Jun 2010 13:03:26 +0200 Message-ID: NNTP-Posting-Date: 06 Jun 2010 13:03:25 CEST NNTP-Posting-Host: cb3e39d3.newsspool1.arcor-online.net X-Trace: DXC=cTh37dB::XJ2:OR3:3gaE@ic==]BZ:afN4Fo<]lROoRA<`=YMgDjhgBBQUbemZCF3N[6LHn;2LCVN[ On Sun, 06 Jun 2010 11:13:46 +0100, Simon Wright wrote: > "Martin Krischik" writes: > >> One should just >> make a habit of defining classes like this: >> >> virtual Base >> { >> public: >> virtual ~Base () >> { >> �K >> } >> } >> >> And suddenly all your virtual inheritance needs work flawlessly. > > I suppose there must be some cost to doing this? or the language > definition would require it to be always so. Yes, in C++. No, in Ada, if Ada supported by-value classes. Since in Ada T /= T'Class you need not put as in C++ the type tag into the object. You could put the tag only into T'Class and leave T as is. You would lose view conversions T <-> T'Class, but they don't have sense for by-value objects anyway. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de