[Biococoa-dev] Compilation warnings with tools

Charles PARNOT charles.parnot at stanford.edu
Tue Feb 8 20:09:20 EST 2005

>So, you mean 'BCAbstractSequence', right?
>I am completely OK with that! (I just wanted to make sure that whatever we
>choose will please everybody).

>Sorry, have to chime in here - I'm not!  I thought the idea here was that
>the convenience methods, which would be present only in classes that
>actually should use that method, would be strictly typed.  That way, anybody
>as uptight as I am can be using strict classes and have access to methods
>with strict signatures in them.

>As long as the use of strong typing remains in the convenience method, that that sounds fine to me too. What I mean is, that the use of strong tying should remain hidden from the user - he should only have to deal with BCSequence.

The reason why I was insisting on having the two methods in the public header, is that we all agreed that we should keep BOTH weakly and strongly typed sequence classes public, as John is reminding us... In terms of implementation, the code required to achieve that for the sequence classes is minimal (through the placeholder class; BTW, technically not a cluster class). However, for the tools, me will have a little more code to put.

I was actually surprised that John did not step in earlier ;-)

So my proposition was to have two methods, eg:
- (BCSequence *)translateSequence:(BCSequence *)aSequence;
- (BCSequenceDNA *)translateDNASequence:(BCSequenceDNA *)aSequence;

(the implementation for the one with BCSequence will be trivial. Note also that even with only the BCSequence method, the amount of code will remain the same: the sequence type checking).

The other options is to have a protocol that is followed by bothe BCSequence and BCSequenceDNA, and only one method:
- (id <BCSequenceDNA>)translateDNASequence:(id <BCSequenceDNA>)aSequence;
but I am not a big fan of it.

To answer your question, yes, John, a BCNucleotideSequence class will be useful :-)
I am almost done with the 'cleaning' of the init methods of the sequence class. Can you wait before changing code in the existing classes, but you can already have the BCSequeceNucleotide added.


Help science go fast forward:

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