[Biococoa-dev] Re: a new design to please everybody (am I pleased?)

Charles PARNOT charles.parnot at stanford.edu
Wed Jan 12 01:06:13 EST 2005


>Just to clarify one thing regarding the section below.  I wasn't suggesting
>our methods themselves were going to crash the app, but rather they make the
>following situation more likely:
>
>bob = [genericSequence complement];
>bobArray = [bob sequenceArray];
>id aSymbol = [bobArray objectAtIndex: 5];  <- app crashes here
>
>Part of it may be just how I do things:  when designing my own objects, I
>put a lot of error checking in to the initialization and transformation
>routines, and then assume for all other purposes that I have an object with
>valid internals.  Faced with using a generic sequence, I wouldn't be able to
>do that, and I'd be checking its length all the time to make sure it's
>valid.
>
>Anyway, I do agree that your plan for moving forward's a good one, and sorry
>you've picked up a cold as well.
>
>Cheers,  JT
>

I agree empty NSArrays can be very annoying (maybe even more than 
nil, sometimes!), and we should avoid them. For instance, returning 
self instead of an empty sequence, or an array with only one sequence 
as a result of a digest.

Charles


Charles Parnot
charles.parnot at stanford.edu

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

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

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


-- 
Charles Parnot
charles.parnot at stanford.edu

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

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

Tel +1 650 725 7754
Fax +1 650 725 8021
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20050111/741805a9/attachment.html>


More information about the Biococoa-dev mailing list