[Bioperl-l] Bio::RootI

Elia Stupka elia@fugu-sg.org
Sun, 18 Nov 2001 12:45:15 +0800 (SGT)


Hi Lincoln, Elia here,

I think I can shed partial light on this:

> I'm puzzled as to why the root interface has any object data at all.
> I've always thought that interfaces should have methods only, and no
> object data.  

Well, this is one of those things that you either hate or love... I
believe Ewan likes to call them *decorated interfaces*, the point being
that since perl allows you to put object data methods in an interface, you
might as well take advantage of it and put some of them in the interface.
This makes anybody coming straight from Java or C feel pure disgust, but
can be considered useful. In practice, as you suggest, the clean solution
is splitting it into an interface and a super class for shared methods,
which doesn't hurt anybody, and is a-la-proper-OO-language.

I suppose if we do it then we should at some point make an active
decision, whether we support decorated interfaces or not.

Hope this explains it... ;)

Elia

-- 
******************************
* http://www.ebi.ac.uk/~elia *
* tel:    +65 874 1467       *
* mobile: +65 90307613       *
* fax:    +65 777 0402       *
******************************