[Biococoa-dev] More on BCSymbolSets

Koen van der Drift kvddrift at earthlink.net
Fri Mar 4 06:29:13 EST 2005

On Mar 3, 2005, at 9:58 PM, Charles PARNOT wrote:

> I suggested in a previous emails that we made all instances immutables 
> (basically sticking to NSSet), for simplicity. In particular, one 
> should not be able to change the symbolSet of a sequence, that would 
> be disastrous. A mutable symbol set would have these problems.
> What do you think?

Yes, immutable sets sounds good to me. But how do we populate them? 
They way the code now works is that each symbol is added one by one. I 
guess we can make an array of symbols and then add them at once using 

> Yes, that is exactly what I think! Did you look at my code? ;-)

Hmm, not sure what you mean - I didn't see anything in the code. Maybe 
my Xcode - cvs is screwed up again :(

> If no symbolset is passed as argument in the initializer, I propose 
> instead to use a default symbol set provided as a method and overriden 
> in each subclass:
> - (BCSymbolSet *)defaultSymbolSet;
> This default symbol set can then be accessed in the implementation of 
> the initializer in the superclass. This default set would be the most 
> general. I think if the user starts a sequence with @"ATGTG" and later 
> add  @"BYTGTG", the symbols "BY" should be recognized (in what you 
> propose, this would not be recognized). That should really be 
> standard. In the absence of choice, we should leave the symbol set as 
> open as possible, or the user will have different behavior depending 
> on how the sequence was initialized.

Sounds good to me.

- Koen.

More information about the Biococoa-dev mailing list