[Bioperl-l] RE: Bio::FeatureHolderI interface confusion

Steve Chervitz sac at bioperl.org
Thu Jun 19 16:03:49 EDT 2003

On Wednesday, Jun 18, 2003, at 01:14 US/Pacific, Ewan Birney wrote:

>   Hilmar and others like him like interfaces being using inside of
> Bioperl development to make explicit what developers are promising
> and how things should be stuck together. Many "micro" interfaces are a
> good thing here.

I'm also in the pro-interface camp, but writing an interface and 
conforming to it in an implementation often feels like an exercise in 
futility since doesn't buy you anything in Perl. It's purely a contract 
between developers and users, so it's a good practice, but if it's not 
helping, it's worth re-thinking. (Maybe in Perl 6 we'll get interfaces?)

The other annoying thing about interface modules is documentation (here 
I go again...). Ideally, the interface would be peppered with lots of 
useful, well-maintained information and any interface-conforming module 
can rely on those docs and just document any features specific to the 
implementation. But tools such as perldoc don't automatically 
incorporate documentation for inherited modules, so we resort to 
cutting and pasting the docs or forcing users to hunt, neither of which 
are desirable.

> Anyway - this is a convention that we should agree on. My proposal is
> to strip bioperl of the developer style interfaces, and strengthen
> the client style interfaces.

I wouldn't object to having fewer interface modules. Another possible 
route: Convert the developer-style interfaces into read-only 
implementations where all setting happens in new() and each method just 
returns the value set during construction. Developers that need to add 
mutability can do so in a subclass. This gives folks the option of 
working with immutable objects, which is not currently possible in 
Bioperl at present.


PS. I can take some of the heat for the existence of interface modules 
in Bioperl. I recall a long-ago discussion I had with Ewan where I 
brought up the idea. So I'm eager to help ease the troubles they've 

More information about the Bioperl-l mailing list