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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aae01e0853bff01c,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-15 10:13:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!195.40.4.120.MISMATCH!easynet-quince!easynet.net!mephistopheles.news.clara.net!news.clara.net!usenet-fr.net!enst.fr!not-for-mail From: Lionel.DRAGHI@fr.thalesgroup.com Newsgroups: comp.lang.ada Subject: Should MI be supported (was: Can MI be supported?) Date: Mon, 15 Sep 2003 19:15:20 +0200 Organization: ENST, France Message-ID: NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: avanie.enst.fr 1063645926 85185 137.194.161.2 (15 Sep 2003 17:12:06 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Mon, 15 Sep 2003 17:12:06 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: X-Mailer: Internet Mail Service (5.5.2653.19) X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:42534 Date: 2003-09-15T19:15:20+02:00 | -----Message d'origine----- | De: Robert I. Eachus [mailto:rieachus@attbi.com] ... | | I don't know that I would call it "has a" but that is exactly what | mix-ins do. But I have wondered whether we got mix-ins too | right in Ada | 95. I just saw a post by Matt Heaney on access discriminants. There | are some roles for which the mix-in needs access to the whole object, | and his particular example (persistant types) is one of them. | But for | most roles where a role only needs access to its own state variables, | mix-ins do the job nicely and much more elegantly than access | discriminants. I agree with this point. By applying in my current project, the rule : - if "Is A" then -> inheritance, - if "Has some characteristics" then -> mixin, then : We use simple inheritance, We use mixin (and never run into case where mix-in needs to access the whole), We didn't use multiple views (but this is possibly due to design pratices), And, for now, i never encounter a "true" case of MI (there is more than half a million Ada lines). Thats why i think Ada 95 was well designed, by addressing the most common needs : simple inheritance and mixins. Mutiple views idiom translate awkwardly in current Ada, but who cares? It's not useful enough to add some new cleaner syntax to the language for now. The important thing is that there is at least an idiom. I think interface inheritance may be a useful improvement for Ada 0Y, but some other MI syntax will not meet an essential expectation. -- Lionel Draghi