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-09 16:48:05 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: aek@vib.usr.pu.ru (Alexander Kopilovitch) Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? Date: 9 Sep 2003 16:48:04 -0700 Organization: http://groups.google.com/ Message-ID: References: NNTP-Posting-Host: 81.211.127.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1063151285 20684 127.0.0.1 (9 Sep 2003 23:48:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 9 Sep 2003 23:48:05 GMT Xref: archiver1.google.com comp.lang.ada:42332 Date: 2003-09-09T23:48:05+00:00 List-Id: olehjalmar kristensen wrote: > In fact, one of the *nice* things about the C++ multiple > inheritance is that it allows me to express roles (a la Reenskaug) and > then combine different roles in the same object without jumping > through hoops. Combining different roles in the same object may be a good thing as far as those roles do not interfere with each other. But in reality they may interfere by subtle and unforeseen way, in some singular points of the problem space. Therefore it is generally important (for the kinds of projects, for which Ada was primarily designed) to maintain organized responsibility among the roles, and this naturally leads to strict prioritization of individual role's authority and responsibility. Single inheritance ideally provides that prioritization, while full-scale multiple inheritance symmetrically spreads responsibilty among several ancestors, and did not provide any guidance for resolving of apparent conflicts between the roles. > In Smalltalk you need an extra tool to do this, in C++ > all you need is a little care. I suppose it *could* be done in Ada > with generics, but I have not tried it, and it would certainly be more > obfuscated. Well, sometimes it may be done with generics, but anyway you may always use straightforward delegation instead of multiple inheritance. In fact, a delegation adds not so much code, and do not harm readability (assuming regular attentive reading, not a brief glance). Alexander Kopilovitch aek@vib.usr.pu.ru Saint-Petersburg Russia