<HTML>
<HEAD>
<TITLE>Re: Subject: [Biococoa-dev] New Structure for BioCocoa part II</TITLE>
</HEAD>
<BODY>
<BLOCKQUOTE><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
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 think?<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
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.<BR>
<BR>
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.<BR>
<BR>
My current reasons for wanting typed subclasses (I can probably think of more, given the time):<BR>
<BR>
Error issues:<BR>
Allows users to catch errors at compile time, rather than having errors pop up while running.<BR>
Corresponding reduction in the amount of code required to catch or prevent errors.<BR>
We’d have to make many decisions regarding what are appropriate return values for nonsensical method calls.<BR>
(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.)<BR>
<BR>
Object oriented design issues:<BR>
Without typing, methods (both convenience and complete methods) wind up grouped with data they can’t operate sensibly on.<BR>
Subclassing allows specific types of data/methods to be grouped by the type of sequence they pertain to.<BR>
Without type, the objects become very “stupid”, performing little more than what an NSArray already does.<BR>
For generic sequence operations, users can still use a generic class – the superclass.<BR>
<BR>
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.<BR>
<BR>
JT<BR>
</SPAN></FONT>
</BODY>
</HTML>