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-Thread: a07f3367d7,5add429c86f59001 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!p4g2000vba.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: Ada vs Eiffel - Ada programmer approach Date: Thu, 4 Jun 2009 05:14:56 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9051a298-df04-448d-8a68-c2788185745e@p4g2000vba.googlegroups.com> References: <405b5054-4c8f-4e16-9ea8-503a9b9f976e@t21g2000yqi.googlegroups.com> <4A19765C.608@obry.net> <8105b65f-4de9-4653-b43a-d55ee33f072d@k2g2000yql.googlegroups.com> <9rWSl.118630$DP1.42605@attbi_s22> <02f8bbe8-b7fa-4633-bf90-1f2b9677264c@r34g2000vba.googlegroups.com> NNTP-Posting-Host: 77.198.58.250 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1244117696 5987 127.0.0.1 (4 Jun 2009 12:14:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 4 Jun 2009 12:14:56 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p4g2000vba.googlegroups.com; posting-host=77.198.58.250; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6233 Date: 2009-06-04T05:14:56-07:00 List-Id: On 4 juin, 11:19, "Dmitry A. Kazakov" wrote: > There is nothing that could replace inheritance, because there is no way = to > "invent" a new type out of nothing. Whatever type algebra operation you > take, it always uses some building blocks (the arguments) from which you > inherit the interface of the result. There is nothing really useful beyon= d > inheritance. Even if you use the minimal possible type-algebraic operatio= n > in Ada: > > =A0 =A0type T (<>) is limited private; > > you still inherit a lot of things. For example attributes, like X'Address= . That's true. But in some languages, like Eiffel, inheritance comes with classes, and classes are too much things at the same time. Many things could be said about it, but the first one in this context, would be : inheritance is one thing, dynamic dispatching is another. As Ludovic said (I agree with what he said), most of time, things can be done another way. Through time, I've learned that the tipical OO inheritance+dynamic- dispatching, is rarely needed. Although when it is needed, it is... Through time I've also learned that when it is needed, it is most of time for some kind of advanced low level and basic type. Large scale architecture can avoid it : not the inheritance, but the type driven dynamic dispatching which confusingly comes with it in traditional OO languages. Hope I did not answer out of the subject :p