In article <3aq9vq$nqb at decaxp.harvard.edu>, robison at lipid.harvard.edu (Keith Robison) writes...
>> Also, I really think there are limits to how much OOP-techniques
>can help you in a non-OOP language. For an example, I offer you the
>NCBI Toolkit. A very nice piece of work -- powerful, reasonably well
>documented, showing clear OOP but written in C. Now both of you
>out there who use it regularly, raise your hands :-)
Wrong example! Netentrez includes great swaths of that code, and a lot of
people use it. A version of the NCBI toolkit was available for VMS/VAX,
VAX C 3.2 (not ANSI C), with Decwindows/Motif 1.1 (X11R4). I needed one
for VMS/AXP, DEC C (ansi C), with DW/Motif 1.2 (X11R5). It took about 2
days of work, total, to redo the build procedures and get it all running.
It took about two weeks elapsed time, partially because I needed
information back from the NCBI, and partially because I was working on
other things at the same time. This was really very easy work, and it was
so *solely* because the toolkit is written in ANSI C. In all of that code
only a couple of lines of source code had to be changed. The NCBI was
modifying the toolbox even as I was porting, so a few errors due to
version inconsistency were also present. Admittedly, the build files needed
major revisions due to the change of compiler, X11 version, and the NCBI's
ongoing reorganization of the code.
> Seriously, the lack of inheritance
>(due to the language not supporting it) oozes from
>every seam. Almost everything gets passed in a type-unsafe manner,
>because there is no inheritance. You have to really stare at the
>documentation to figure out which types of pointers you should be
>passing. And long names to the functions, due to no name
That much is certainly true - types are based on types, are based on types,
ad nauseum. If it were C++ a class browser would tell the programmer most
of this information. Since it is C, better documentation is needed to
accomplish pretty much the same thing.
mathog at seqvax.bio.caltech.edu
Manager, sequence analysis facility, biology division, Caltech