[Bioperl-l] Bio::RootI

Lincoln Stein lstein@cshl.org
Sun, 18 Nov 2001 12:45:20 -0500


The decoration functions, like throw(), would still be there.  I'm
comfortable with interfaces implementing some useful functions.  It's
the ones that depend on the hashref being there that I would turn into 
pure interface (stub) functions.

Unless there is a big objection, I'll make the proposed changes.

Lincoln

Ewan Birney writes:
 > On Sun, 18 Nov 2001, Elia Stupka wrote:
 > 
 > > 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 like "decoration" to be function only.
 > 
 > I think what Lincoln doesn't like is the data/implementation dependence of
 > the RootI assumming there is a hash there - I don't like this at all.
 > 
 > 
 > Obviously all things are possible, and we just have to decide. I like the
 > rule:
 > 
 > 
 >   Interfaces only contain function stubs which throw or functions with
 > implementation which only depend on other function stubs.
 > 
 > 
 >   Bio::Root being a "default" implementation object with the IO smarts I
 > think is a good idea.
 > 
 > 
 > 
 > 
 > 
 > > 
 > > 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       *
 > > ******************************
 > > 
 > > 
 > > _______________________________________________
 > > Bioperl-l mailing list
 > > Bioperl-l@bioperl.org
 > > http://bioperl.org/mailman/listinfo/bioperl-l
 > > 
 > 
 > -----------------------------------------------------------------
 > Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
 > <birney@ebi.ac.uk>. 
 > -----------------------------------------------------------------

-- 
========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein@cshl.org			                  Cold Spring Harbor, NY

NOW HIRING BIOINFORMATICS POSTDOCTORAL FELLOWS AND PROGRAMMERS. 
PLEASE WRITE FOR DETAILS.
========================================================================