[Bioperl-l] PrimarySeqI and IdentifiableI

Ewan Birney birney@ebi.ac.uk
Fri, 6 Sep 2002 17:51:57 +0100 (BST)


On Fri, 6 Sep 2002, Hilmar Lapp wrote:

> 
> 
> > -----Original Message-----
> > From: Ewan Birney [mailto:birney@ebi.ac.uk]
> > Sent: Friday, September 06, 2002 12:32 AM
> > To: Hilmar Lapp
> > Cc: Bioperl
> > Subject: Re: [Bioperl-l] PrimarySeqI and IdentifiableI
> > 
> > 
> > On Thu, 5 Sep 2002, Hilmar Lapp wrote:
> > 
> [...]
> > > 
> > > I'll have to fix Bio::Seq anyway (I guess there's little doubt it 
> > > should be Identifiable), but if we decide to separate IdentifiableI 
> > > (and DescribableI) from PrimarySeqI, I'll fix that right away, too.
> > 
> > It is a good question - I would say that they should 
> > implement the methods
> > but could easily pass back "" strings. What is the other solution - A
> > composition solution? Then clients have to test whether
> > 
> > $seq->identifier() is undef?
> > 
> 
> No, not composition (although that's an option too). By separation I
> rather meant that then you can't assume that if obj->isa("Bio::PrimarySeqI")
> is true $obj->isa("Bio::IdentifiableI") will be true, too.
> You'd have to test for this separately before safely calling the
> IdentifiableI methods. So, a PrimarySeqI implementation could opt
> not to implement IdentifiableI.
> 
> Right now having tested for isa("Bio::PrimarySeqI") implies having
> tested for isa("Bio::IdentifiableI").


Aha. I am ok with this. Go for it.


> 
> 	-hilmar
> 

-----------------------------------------------------------------
Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
<birney@ebi.ac.uk>. 
-----------------------------------------------------------------