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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81bb2ce65a3240c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.201.168 with SMTP id kb8mr4226459pbc.3.1335524650780; Fri, 27 Apr 2012 04:04:10 -0700 (PDT) Path: r9ni104130pbh.0!nntp.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!takemy.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Fri, 27 Apr 2012 13:04:08 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> <9af5eaaa-1c48-4455-a8e8-39dd9ee8092d@ot8g2000pbb.googlegroups.com> <3324774.1793.1335453581565.JavaMail.geo-discussion-forums@yncc41> <21303184.864.1335494280519.JavaMail.geo-discussion-forums@pbgg10> <4f9a543a$0$6563$9b4e6d93@newsspool4.arcor-online.net> <4f9a6af0$0$6566$9b4e6d93@newsspool3.arcor-online.net> <1lxhvqsv4vrk3.151nwucj0yj15.dlg@40tude.net> In-Reply-To: <1lxhvqsv4vrk3.151nwucj0yj15.dlg@40tude.net> Message-ID: <4f9a7d28$0$6565$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 27 Apr 2012 13:04:09 CEST NNTP-Posting-Host: 634820ec.newsspool3.arcor-online.net X-Trace: DXC=5fbJ:25N06J[kmHKHnaEnMMcF=Q^Z^V3H4Fo<]lROoRA8kFJLh>_cHTX3jMfIJ9nF>a[2N X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-04-27T13:04:09+02:00 List-Id: On 27.04.12 12:05, Dmitry A. Kazakov wrote: > On Fri, 27 Apr 2012 11:46:24 +0200, Georg Bauhaus wrote: > >> On 27.04.12 10:19, Dmitry A. Kazakov wrote: >>> On Fri, 27 Apr 2012 10:09:31 +0200, Georg Bauhaus wrote: >>> >>>> On 27.04.12 04:38, ytomino wrote: >>>> >>>>> And, some languages such as C# has tackled the problem that a base-class >>>>> is changed independently of derived-classes. >>>> >>>> Implying, maybe, that inheritance of classes may not be the >>>> best way to write reusable modules? >>> >>> and the best way is? >> >> Starting from at least one important distinction: >> >> - is-a inheritance used where >> - has-a should have been used. > > HAS-A to reuse modules? In a place A, I use the features of a module M without introducing any of its naming issues into the facade of A. If someone changes the module M, this change does not propagate into the facade of A. This method dismisses, I should say, any compiler based reasoning that transcends the boundaries of either M or A and stops at the rules for using features of M behind the facade of A. > To start with you cannot have HAS-A on subprograms > in Ada. I mentioned delegate objects, resorting to single subprograms is not considered necessary or advantageous in many O-O settings. This idea blends well, I think, with the subprogram types that you have mentioned. Meaning that subprograms are in fact objects. I fantasize that it does not blend well with grand unified type theory. Not saying that this lack is any good. To see the reason for the bias, consider "non-data type" as a hash table because implementing "non-data type" uses a hash table. I'd like a language to prevent this use of IS-A, rather than encourage it. >> Another hint at a possibly non-best way is the STL. > > So the claim is that reuse of generic units does not suffer the problems > reuse of inherited operations have? No. The STL does not seem to suffer, otherwise there would be huge pressure to change it to be IS-A all over the place. Some uses of C++ templates and resolution rules can create pain, if judged by efforts to ease the pain, in part with the help of "concepts". If names of generic instances are made problems, they are not really the same problems that overriding names could produce, or are they? And then, the goal of generics was not, I think, to supplant true MI. -- S := { set of dotless names }, |S| =: n. package P is new G; -- S' := S ∪ { set of dotless names introduced by P }. -- |S'| = n + 1.