comp.lang.ada
 help / color / mirror / Atom feed
From: Lionel.DRAGHI@fr.thalesgroup.com
To: comp.lang.ada@ada.eu.org
Subject: Should MI be supported (was:  Can MI be supported?)
Date: Mon, 15 Sep 2003 19:15:20 +0200
Date: 2003-09-15T19:15:20+02:00	[thread overview]
Message-ID: <mailman.1.1063645890.302.comp.lang.ada@ada.eu.org> (raw)



| -----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



             reply	other threads:[~2003-09-15 17:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-15 17:15 Lionel.DRAGHI [this message]
2003-09-15 23:26 ` Should MI be supported (was: Can MI be supported?) Matthew Heaney
2003-09-23 10:45   ` Should MI be supported Jacob Sparre Andersen
2003-09-24  1:31     ` Matthew Heaney
2003-09-16 16:23 ` Should MI be supported (was: Can MI be supported?) Mário Amado Alves
  -- strict thread matches above, loose matches on Subject: below --
2003-09-16  8:16 Lionel.DRAGHI
2003-09-16 11:02 ` Matthew Heaney
2003-09-17  3:12   ` Robert I. Eachus
2003-09-17  3:25     ` Matthew Heaney
2003-09-17 10:36     ` Lutz Donnerhacke
2003-09-23  8:44       ` Robert I. Eachus
2003-09-16 11:57 Lionel.DRAGHI
2003-09-17  3:36 ` Matthew Heaney
2003-09-17 18:16   ` Hyman Rosen
2003-09-18  8:25 Lionel.DRAGHI
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox