Thread: Mixin class

  1. #1
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446

    Mixin class

    Need clarification please,

    Conceptually, not in practice, is a Mixin class supposed to augment the interface of another base class or the leaf class deriving from them both?

    I understand the difference may be small on paper, since a Mixin only makes its purpose apparent through the leaf class which inherits both from its base and the Mixin. But conceptually I can also see the Mixin augmenting its sister base class interface with this.

    I'm having trouble understanding which is right?
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >is a Mixin class supposed to augment the interface of another base class or the leaf class deriving from them both?
    Conceptually you could go with either, though I think the latter is more intuitive.
    My best code is written with the delete key.

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    > Conceptually you could go with either, though I think the latter is more intuitive.

    Thanks Prelude.
    So, it's possible to still call a Mixin a Mixin, if the sister base class is not an ABC, correct?

    EDIT: Scratch that. The answer seems to be obviously yes.
    Last edited by Mario F.; 11-12-2006 at 07:11 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Class design problem
    By h3ro in forum C++ Programming
    Replies: 10
    Last Post: 12-19-2008, 09:10 AM
  2. Specializing class
    By Elysia in forum C++ Programming
    Replies: 6
    Last Post: 09-28-2008, 04:30 AM
  3. matrix class
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 07-13-2007, 01:03 AM
  4. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM