[Biococoa-dev] BCSequence
Alexander Griekspoor
mek at mekentosj.com
Mon Aug 23 14:49:55 EDT 2004
Op 23-aug-04 om 18:10 heeft John Timmer het volgende geschreven:
>
>>>>>> It's a NSSting representation of the array of Symbols, using their
>>>>>> 'symbolString' variable.
>>>>>
>>>>> Okay, so I'll just make sure to update it whenever a method
>>>>> changes the
>>>>> sequence.
>>>>
>>>> Isn't that what we tried to avoid by using a string to contain a
>>>> sequence? I
>>>> think it's better just to recreate an NSString, when someone asks
>>>> for it,
>>>> instead of updating it with every edit.
>>>
>>> Indeed, this is exactly what we don't want to do!! Therefore, this
>>> should NOT
>>> be a variable, rather a METHOD. Please change it to something like:
>>> -(NSString *)stringRepresentation;
>
> Okay, so given all this, how about the following:
> We delete the "sequenceString" variable from BCSequence
Yes please
> We implement " -(NSString *)stringRepresentation" to generate the
> string on
> the fly using "symbolString" on each Symbol (already done and waiting
> on
> approval to commit).
Yep, I agree
> Since the "initWithString" is not meant to be used in the base class
> anyway,
> and there's no variable to stick a string into anymore, we can have it
> return nil. Subclasses should override it, as they should have.
I think that's indeed a good plan.
> As far as thread safety, I agree it is probably too early to start
> locking
> various methods down, but I think we should try as best we can to
> design our
> classes so that if/when it's time to do so, things are as simple as
> adding a
> few locks in critical places, rather than discovering that we need to
> redesign the class then.
True, although I do not have that much experience to keep that in mind
;-)
Alex
*********************************************************
** Alexander Griekspoor **
*********************************************************
The Netherlands Cancer Institute
Department of Tumorbiology (H4)
Plesmanlaan 121, 1066 CX, Amsterdam
Tel: + 31 20 - 512 2023
Fax: + 31 20 - 512 2029
AIM: mekentosj at mac.com
E-mail: a.griekspoor at nki.nl
Web: http://www.mekentosj.com
Windows is a 32-bit patch to a 16-bit shell for an 8-bit
operating system, written for a 4-bit processor by a 2-
bit company without 1 bit of sense.
*********************************************************
**************************************************************
** Alexander Griekspoor **
**************************************************************
The Netherlands Cancer Institute
Department of Tumorbiology (H4)
Plesmanlaan 121, 1066 CX, Amsterdam
Tel: + 31 20 - 512 2023
Fax: + 31 20 - 512 2029
AIM: mekentosj at mac.com
E-mail: a.griekspoor at nki.nl
Web: http://www.mekentosj.com
MacOS X: The power of UNIX with the simplicity of the Mac
***************************************************************
More information about the Biococoa-dev
mailing list