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,73f81e5f5d6ee80f X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: MI is sloppy (was: Construction initialization problem) Date: Wed, 10 Dec 2008 18:40:46 -0600 Organization: Jacob Sparre Andersen Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1228956068 17806 69.95.181.76 (11 Dec 2008 00:41:08 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 11 Dec 2008 00:41:08 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news1.google.com comp.lang.ada:2951 Date: 2008-12-10T18:40:46-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:d0goewygto13.10nsyzpabm3vn.dlg@40tude.net... > On Fri, 5 Dec 2008 19:42:40 -0600, Randy Brukardt wrote: > >> A waste of effort. I don't believe in multiple inheritance (in any form); >> it >> seems to me to be an excuse for sloppy design. > > It is like saying that a record with two components is a sloppy design. > Either inheritance is a rubbish concept or else it is multiple. > > My pet example of MI is: > > type In_File is ...; > procedure Get (File : in out Input_File; Item : out Data); > > type Out_File is ...; > procedure Put (File : in out Output_File; Item : Data); > > type Inout_File is .. ? > > Is it sloppy? I tend to think so. These are insufficiently different to be types; there should only be one type and different subtypes. Subtypes imply runtime checks, but with good contracts most such errors can still be detected by tools. And you don't have the goofy restrictions that come with trying to make things separate types that aren't logically separate. This is very much like the attempt to statically check accessibility (lifetime) of objects. It doesn't work, at least not in general. And we have much better technology in terms of detecting errors without goofy restrictions than we did when these rules were defined, so why not use them?? Randy.