[Biococoa-dev] Comments on BCAnnotation

Charles PARNOT charles.parnot at stanford.edu
Thu Feb 24 01:17:06 EST 2005

After going through your code, Alex, here are my comments:

* we should make BCAnnotation and BCFeature immutable and thus not have any setter; for instance, the annotations would otherwise have to be physically copied every time a piece of sequence is copied and pasted or used for alignement, etc...

* I don't like the comparison methods names; why not stick to the Cocoa way, which is simply 'compare:' using 'compareName:' and 'compareContents:'. And I am not sure why you would need a ascending and descending method when one can use reverseEnumerator?

* In the comparison: more generally, if the Contents are of the same class and both respond to 'compare:', then this is what is used

* the data type should be an ivar, if you want to preserve annotations coming from another app; in which case the contents is NSData; more precisely, when unarchiving, if the class is known, the contents is unarchived; otherwise, the ivar 'contentsClass' stores the class name and the ivar 'contents' stores the unarchived data;

otherwise, it looks very clean and a good start!


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