Strategic Functional Migration and Multiple Inheritance

  • Thread starter Thread starter Guest
  • Start date Start date
Saad Rehmani said:
*sigh* ... old people ... :)

I'll just repeat the question then -- do you think C# is simpler than C?
Okay, now you're just getting pissy. Anyways, since this isn't
comp.object, i'll try to be civil :)

page 20: "This leads to our second principle of object-oriented design:
Favor object composition over class inheritance."

While you're at it, you might want to re-read the part where they suggest
inheriting from only abstract classes (i.e., Interfaces?) since they
provide little or no implementation.

Reread the last sentence of mine quoted above.

Also, read what GoF also say on p. 20: "Reuse by inheritance makes it easier
to make new components that can be composed with old ones. Inheritance and
object composition thus work together."

Again, they wouldn't use inheritance in the book if they thought it
shouldn't be used. They reuse code via inheritance (as in the quote above),
so if they do indeed suggest inheriting from only abstract classes, they're
contradicting themselves. Which is fine -- my correspondence with Vlissides
dealt with our mutual dissatisfaction with the Mediator pattern. GoF aren't
gods.

Abstract classes are not interfaces, and they do not provide little or no
implementation. They are simply classes that must be subclassed. I'm working
with an abstract class right now which contains the bulk of the code, where
derivations only contribute one short method.
I prefaced it with 'even in an SI language' since I obviously dont have
experience with an MI language ... read what I write! :)

Sorry, I misunderstood that.
By the way, have you considered AOP? I have pretty extensive experience
with that and personally found it quite lacking. Given your MI background,
you might find it more useful.

No, I'm afraid I don't have any experience in AOP.
Errr ... this is a C# newsgroup? ;)

Well, you certainly wouldn't know it by most of the messages, which have
nothing to do with the C# language.

No, I simply responded to your request for books pointing out the benefits
of MI.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top