[Bioperl-l] multiple inheritance

Ewan Birney birney at ebi.ac.uk
Thu Jul 31 03:48:48 EDT 2003


> Comments?

Why not go to a composition/delegation mode, with one object having the
other one, rather than multiple inherietance.


  Or, if you want to keep symmetry,

have two interface definitions.

Have two separate implementation objects which separately inheriet from
each interface

Have a single holder object which multiply inheriets from each interface
and has-a copy of each object. Put code which knows about "both" objects
into the holder object and delegate interface calls to the right object.

This will actually keep your code cleaner, as it forces the dual methods
to be cleanly separated from the single methods



multiple inherietance of implementations is downright evil IMNSHO - avoid
at all costs...



>
> --
> Jason Stajich
> Duke University
> jason at cgt.mc.duke.edu
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list