[Biococoa-dev] More on BCSymbolSets
jtimmer at bellatlantic.net
Mon Feb 28 19:41:56 EST 2005
>> You're typically going to be calling this method on a BCAbstractSequence to
>> find out what kind of sequence it actually is. Making it a class method
>> defeats this purpose. If you meant this to provide what the default is for
>> the class as a whole, then the method should be named to reflect that.
> I am not sure I understand what you are saying.
> I declared this class method, because it seems that all instances of
> a given class will have the same sequence type. Is that right? In
> fact, is there really a need for an ivar? An instance method could be
> used instead that always return the same value in a given class. Do
> you mean we should use an instance method instead, or do you mean we
> should name this method 'defaultSequenceType'?
Well, my point is regarding the following situation: you have an abstract
sequence reference, which points to an actual sequence. You need to know
what type of sequence that is, so you need to ask that instance "what
sequence type are you?". You can't ask an instance for a class method. I
guess you could get the instance's class and ask the class its sequence
type, but that seems a bit awkward in comparison.
Incidentally, how does ObjC work: you have a pointer typed to one thing,
and it actually holds a subclass - when you request its class, what do you
More information about the Biococoa-dev