IUBio

readseq in C++/Java - comments?

Andrew Dalke dalke at ks.uiuc.edu
Tue Jul 15 00:05:39 EST 1997


(my newsreader lost the post before I got the "From:" part
of it, so I can't attribute the author correctly)
> Do you have concerns about C++ as a portable source?

I've been doing C++ programming for about 4 years now.
At the beginning there were a lot of problems between
the different compilers, especially with template support.
We had to hack a few workarounds, but since then, nearly
all of the problems have been fixed [1].

Thus, in the latest code release, someone pretty easily
took our code (about 100,000 lines) and compiled for Suns;
an architecture we had never tried.

> Java is becoming the single best choice for any software
> with a user interface.

  It does look pretty.  I'm waiting to see how Tk8.0 turns out,
since that is supposed to have good native GUI platform support
for X/MS Windows/MacOS.

> drop into an application container and link together with
> other program parts to form a new application.
> [...]
> One can't do this with C++ or C code.

You can, with dynamic loading.  BeOS (www.be.com) is built on C++
and uses dynamic loading of new objects so others can provide
application level add-ons.  The limitation is youn can only add
classes with a known interface (hence the "fragile base class"
problem.
  Does Java's class mechanism have the same problem, or did it
go the more dynamic resolution of Objective C?  I didn't think
it had an effective "eval" or function dispatch mechanism, 


> Java certainly is faster than Perl, 

Really?  I'm astonished at that.  I thought except for a few JIT
machines Perl would be faster.  Where did you see this?

> and note how many use Perl glue for many similar tasks.

Wouldn't a better comparison for "glue" applications be the
number that use Tcl?  My personal favorite is Python
(www.python.org), but that's pretty obsure by most people's
standards (but the most known of the obscure ones :) .


> your next computer will likely have an OS (or microprocessor)
> tuned to Java.

Perhaps my next/next one, but think how long it would take to
rewrite all the applications I use everyday (mail reader, word
processor, graphing program, shell commands, group scheduler,
image viewer).  Odds are, if everyone does make the switch to
Java, it will still be a long time before over 1/2 of my CPU
instructions are devoted to JVM execution, so I doubt the OS
will be tuned (except in hype).
  But if you are suggesting a JVM coprocessor ... that would
be verry nice.

						Andrew Dalke
						dalke at ks.uiuc.edu


[1] Gnu C++ instanciates templates different than everyone else
if part of the code is in a .h file and part is in a .c; this
can be fixed with a $ifdef GNUC ... #include ".c file" ... #endif
    HP didn't like "///This is a comment\\\" as a comment line since
the \ escaped the <newline>.  This may be fixed now.




More information about the Bio-soft mailing list

Send comments to us at biosci-help [At] net.bio.net