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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-16 08:26:48 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!sccrnsc03.POSTED!not-for-mail From: "Mark A. Biggar" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? References: <3F5F7FDC.30500@attbi.com> <3F6079A9.6080108@attbi.com> <3F60E380.4020307@attbi.com> <3F65ED07.116@mail.ru> In-Reply-To: <3F65ED07.116@mail.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <1XF9b.474809$Ho3.80013@sccrnsc03> NNTP-Posting-Host: 12.235.88.213 X-Complaints-To: abuse@comcast.net X-Trace: sccrnsc03 1063725885 12.235.88.213 (Tue, 16 Sep 2003 15:24:45 GMT) NNTP-Posting-Date: Tue, 16 Sep 2003 15:24:45 GMT Organization: Comcast Online Date: Tue, 16 Sep 2003 15:24:45 GMT Xref: archiver1.google.com comp.lang.ada:42573 Date: 2003-09-16T15:24:45+00:00 List-Id: Dmytry Lavrov wrote: > IMO,if there are difference between inheritance and having class inside > other class(so called delegation),it's problem of bad language design. No, this is the central paradox of OO theory. It is very often the case that the implementation inheritance relationship and the Lyskov substitutability (interface) inheritance relationship between two classes are in direct opposition to each other. For example, you really want integer isa float, so that you can use an integer like a float, but you also really need to use integers (for exponents) in the implementation of floats. This means that languages really want to support both interface and implementation inheritance as explicitly different features. There are several ways that two classes can be related: 1) A isa B (lyskov substitutability) 2) A is implemented using a B (delegation) 3) A contains a B as a member (possibly multiple indexes instances) 4) no relation at all. And a language needs to support all of these. -- mark@biggar.org mark.a.biggar@comcast.net