From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: MI is sloppy (was: Construction initialization problem)
Date: Wed, 10 Dec 2008 18:40:46 -0600
Date: 2008-12-10T18:40:46-06:00 [thread overview]
Message-ID: <ghpnj4$hce$1@munin.nbi.dk> (raw)
In-Reply-To: d0goewygto13.10nsyzpabm3vn.dlg@40tude.net
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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.
next prev parent reply other threads:[~2008-12-11 0:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-06 10:09 MI is sloppy (was: Construction initialization problem) Dmitry A. Kazakov
2008-12-06 17:16 ` Georg Bauhaus
2008-12-06 21:16 ` Martin Krischik
2008-12-06 21:35 ` Maciej Sobczak
2008-12-07 9:12 ` MI is sloppy Dmitry A. Kazakov
2008-12-07 15:38 ` Georg Bauhaus
2008-12-07 20:04 ` Dmitry A. Kazakov
2008-12-11 0:40 ` Randy Brukardt [this message]
2008-12-11 10:02 ` Dmitry A. Kazakov
2008-12-11 21:44 ` Randy Brukardt
2008-12-11 23:17 ` Georg Bauhaus
2008-12-12 10:06 ` Dmitry A. Kazakov
2008-12-12 9:59 ` Dmitry A. Kazakov
2008-12-12 10:50 ` Georg Bauhaus
2008-12-12 11:15 ` Dmitry A. Kazakov
2008-12-12 12:15 ` Georg Bauhaus
2008-12-12 13:35 ` Dmitry A. Kazakov
2008-12-12 14:29 ` Georg Bauhaus
2008-12-12 14:59 ` Dmitry A. Kazakov
2008-12-13 0:08 ` Randy Brukardt
2008-12-13 9:54 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox