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-Language: ENGLISH,UTF8 X-Google-Thread: 103376,1592759aa83d0d45 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-31 02:25:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-036-245.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: MI in Ada 200X Date: Sat, 31 May 2003 11:27:34 +0200 Organization: At home Message-ID: References: <0Pxza.699607$OV.652508@rwcrnsc54> <4a4de33a.0305280557.5d5aba37@posting.google.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-036-245.arcor-ip.net (145.254.36.245) Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Trace: fu-berlin.de 1054373108 7612701 145.254.36.245 (16 [77047]) User-Agent: KNode/0.7.1 Xref: archiver1.google.com comp.lang.ada:38183 Date: 2003-05-31T11:27:34+02:00 List-Id: Karel Miklav wrote: > Dmitry A. Kazakov wrote: >> Wesley Groleau wrote: >>>>>Mário Amado Alves wrote: >>>>> >>>>>>Everybody wants class MI. The reasons it was left out of Ada 95 and >>> >>>I don't! >> >> OK. Bill Gates once said that nobody would need more than 64K RAM. Or was >> it 640K? I do not remember. Anyway, never say never. (:-)) > > I don't see how this is related to MI. What do you think about the > diamond problem and other evils of MI? Incest? A bad thing, you know. However, I would not call a problem anything that can be detected at compile-time. Anyway we have a lot of diamond-things in present Ada. Consider: with Ada.IO_Exceptions; package B is End_Error : exception renames IO_Exceptions.End_Error; ... end B; with Ada.IO_Exceptions; package C is End_Error : exception renames IO_Exceptions.End_Error; ... end C; with B; use B; with C; use C; procedure D is ... exception when End_Error => -- which End_Error? exception renaming is not 'renaming', but a new view. In C++ terms it is sort of "B : public A", not "B : public virtual A" (as a naive programmer might think). > Besides, where do or would you use this feature? First from the stack: to make a stream object controlled. (*) > MI might look like a good idea in a simple project, but when things > start to get messy and you're caught into inheritance net, you can > forget who your own mother is :) I vote NO for MI and other inventions > of marketing departments but YES for interfaces. (*) Ada.Streams.Root_Stream_Type is not a [public] descendant of Ada.Finalization.Limited_Controlled. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de