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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1592759aa83d0d45 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-28 17:54:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!wn14feed!worldnet.att.net!199.45.49.37!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny02.gnilink.net.POSTED!53ab2750!not-for-mail From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: MI in Ada 200X References: <0Pxza.699607$OV.652508@rwcrnsc54> <4a4de33a.0305280557.5d5aba37@posting.google.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Thu, 29 May 2003 00:54:00 GMT NNTP-Posting-Host: 162.84.146.112 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny02.gnilink.net 1054169640 162.84.146.112 (Wed, 28 May 2003 20:54:00 EDT) NNTP-Posting-Date: Wed, 28 May 2003 20:54:00 EDT Xref: archiver1.google.com comp.lang.ada:37959 Date: 2003-05-29T00:54:00+00:00 List-Id: Preben Randhol wrote: > Seriously what are the pros and cons of MI. If SI is considered useful, I fail to see why MI would not be considered useful. Implementing MI has its difficulties, related to complicated memory layouts, casting, and so forth. You can get an idea for the complexities by looking up the C++ ABI that gcc implements. Here's a particular example which is ever annoying in Java. A common design pattern in Java is to have an interface, and then make a companion class which implements the interface and provides do-nothing implementations for all the methods. If you want a class which implements both interfaces and does nothing for most of the methods, you can't inherit from both companion classes. Instead, you must reimplement at least one set of the dunsel methods. C++ also has its stream classes, where istream and ostream inherit from an ios_base, and then iostream inherits from istream and ostream.