[Biococoa-dev] SequenceIO

Charles Parnot charles.parnot at gmail.com
Wed Jun 29 13:11:15 EDT 2005

On Jun 29, 2005, at 3:32 AM, Koen van der Drift wrote:

> On Jun 29, 2005, at 12:33 AM, Charles Parnot wrote:
>> One of the problem at this point is we have not fully decided on a  
>> strong clear BCAnnotation object. Alex has started something, but  
>> I don't think he was done yet?
> Right now the BCAnnotation object mimics a dictionary. And one  
> could argue whether we should not just use a wrapper for a  
> dictionary. But that's not the most important issue.

I think that encapsulating the BCAnnotation is a good thing. At this  
point, it is a dictionary, but it could change in the future and keep  
the same interface/header, so that the framework users don't have to  
change their code.

> Basically, they are stored in BCSequence as another dictionary,  
> using the key of the annotation as the key and a BCAnnotation  
> object as value. Maybe it is easier this way when looking up  
> annotations, but it seems overcomplicated to me. If we keep a  
> annotations wrapper object, why not store them in an NSArray?

It is not really complicated. It is redundant, yes. But maybe  
redundancy in this case is also convenient, as we can quickly access  
the list of annotation names without looping through the NSArray.  
Though there would convenience methods to do that even with NSArray,  
e.g. KVO and 'valueForKeyPath'.

In any case, one of the thing we agreed on at the WWDC (and you would  
not know, sorry :-), is that there probably won't be a performance  
issue with annotations, so the way we do it does not really matter so  
much. NSArray, NSDictionary: tomato, tomato. So the bottom line is: I  
will do whatever the majority decides on this one.


More information about the Biococoa-dev mailing list