[Biococoa-dev] Subclass organization

Charles PARNOT charles.parnot at stanford.edu
Thu Feb 24 22:30:01 EST 2005


>>Well, I don't really see the point in having complement there when I'm going
>>to create BCSymbolNucleotide, so I'll just do an experiment when I get into
>>work tomorrow (where I've got the initial files):  can I move the complement
>>method to BCSymbolNucleotide and not have anything break, build wise?
>>
>
>John,
>
>I thought you agreed that returning self instead of nil was a good alternative, sorry if I misunderstood. Feel free to go ahead and move the complement code to BCSymbolNucleotide.
>- Koen.

I think what John means is that in BCSymbol, -complement can return self:
- (id)complement
{
	return self;
}


and BCSymbolNucleotide would override this and have an ivar 'complement' to cache the result.

It makes more sense, actually, because then it really takes advantage of the superclass-subclass design, where more specialized subclasses override superclass methods.

is that it, John?

charles

-- 
Help science go fast forward:
http://cmgm.stanford.edu/~cparnot/xgrid-stanford/

Charles Parnot
charles.parnot at stanford.edu

Room  B157 in Beckman Center
279, Campus Drive
Stanford University
Stanford, CA 94305 (USA)

Tel +1 650 725 7754
Fax +1 650 725 8021



More information about the Biococoa-dev mailing list