Subject: [Biococoa-dev] New Structure for BioCocoa part II
jtimmer at bellatlantic.net
Mon Jul 4 13:26:10 EDT 2005
> Well, I hope it will be, but it would be foolish to say that it is ;-) At
> least we all agree it makes sense. Which brings me to one more discussion.
> Unfortunately, that definitely requires John to be there (John are you
> listening? ;-) We had the discussion a few times and I again think it's time
> to revive it once more: The typed vs untyped sequence. The reason for the
> hybrid class cluster / superclass structure we have now. I was always in favor
> of the latter, but I did see that this way it's to confusing to us and
> certainly to new users. I've said that I would like to see it disappear. So,
> if that means that I have to adjust my opinion, and also that I have to do
> more error checking in my code instead of the framework, then that is what I
> have to do. Again, I want to see John's opinion on this first, but in return
> for simplicity shall we then indeed implement things first using the one
> BCSequence type does it all method and see how well it works? What do you guys
Wow, just got back from a couple of days relaxing away from the city, and I
see things have been very busy. Anyway, as I never planned on taking
advantage of the class cluster features, I have to admit I hadn¹t realized
there were problems with it. I too can see how it might be confusing to new
users, but I don¹t see the subclass design as confusing in the same way, so
I think the class cluster issue and the subclass issue are separate ones.
Given that we¹re doing a re-design, I think it would be a good time to
restate what the issues are regarding the single vs. typed class design as
they currently stand. So, Koen, could you state what your current thoughts
are regarding what¹s wrong with the current subclass structure, and what
advantages a single class would bring.
My current reasons for wanting typed subclasses (I can probably think of
more, given the time):
Allows users to catch errors at compile time, rather than having errors pop
up while running.
Corresponding reduction in the amount of code required to catch or prevent
We¹d have to make many decisions regarding what are appropriate return
values for nonsensical method calls.
(These three are specific to issues like asking a protein for its
melting point, or asking RNA about its hydrophobicity the unexpected
return values can potentially crash a program.)
Object oriented design issues:
Without typing, methods (both convenience and complete methods) wind up
grouped with data they can¹t operate sensibly on.
Subclassing allows specific types of data/methods to be grouped by the type
of sequence they pertain to.
Without type, the objects become very ³stupid², performing little more than
what an NSArray already does.
For generic sequence operations, users can still use a generic class the
In the end, we all agree that a sequence has to be typed on some level, so
the user can tell what sequence type they have. I don¹t see why doing it at
the class level, which allows much better organization and object oriented
design, should be viewed as a problem.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Biococoa-dev