21 Oct 2007 (updated 27 Oct 2007 at 14:26 UTC)
»
GNU Classpath 0.96 - "Staying alive"
Again, a new version of GNU Classpath, our old Free java
runtime library, has been released - GNU
Classpath 0.96. Apart version numbers, many releases
also have smart names: A La Mort Subite, All for One, One
for All, Dreamland ... But for everybody who is more
or less aware about the current history of java, the recent
name of 0.96 sounds more aggressive than any
previous. Staying alive. Too pretty to die.
Who have changed since the times of 0.93, when multiple GNU
Classpath hackers, myself including, were demonstrating
fully functional GNU Classpath Swing for the astonished
public in a number of software conferences? How happened
that the nine year old project with near two millions lines
of code feels proud just surviving? Well, we, surely
know: Sun have released the majority of its own java runtime
library under GPL. Soon it will not be necessary to use and
develop the GNU Classpath code just because it is Free when
Sun's code is not. Unless, of course, other reasons would
appear.
Somebody who is not aware about the current state of the GNU
Classpath may say: that is fine, just merge the Sun's code
in! However while Classpath continues getting multiple
patches per day, no significant merging activity have ever
been seen. The reason is simple: GNU Classpath
implementation is too complete. There were several useless,
non functional stubs in the past (RMI-IIOP implementation,
for instance). However it is long time since they are
replaced by the fully working code. There are no parts that
are just non-functional, clearly deserving to be ripped out,
stuffing the Sun's code instead. Or should we believe that
any single line of code from Sun is doubtlessly better?
Written by professionals? That do you know about the GNU
Classpath team, if you think so?
Yes, there are tasks where the current Sun's 1.5
implementation (with some pretty proprietary stuff inside
remaining, by the way) performs faster, but does this mean
that GNU Classpath should now be abandoned? The programming
user who does not want to spend any time comparing the
sources of these two implementations would likely just pick
the variant that is more efficient today. But it is possible
to imagine projects that dig deeper than just using java.
Now, then the Free Sun's implementation starts emerging, the
major value of GNU Classpath may be in that it
implementation is different.
From one side, GNU Classpath implements the same official
API. But from the other side, no GNU Classpath hacker has
ever been allowed to look into Sun's code while writing the
alternative implementation. This means, that many or even
majority of the algorithms in Sun's and GNU's
implementations are realized differently. This opens a
really exiting prospects to compare the solutions, picked by
various developers when implementing exactly the same
framework. From the first sight, this comparison may look
very difficult and work-intensive to do. However we should
not forget that (differently from GNOME and KDE, for
instance) we speak about the system where the modules of the
alternative implementations are aligned against each other.
Packages consist of classes, classes consist of
methods and these methods must have the exactly the same
functionality implemented. Hence it is surely possible to
compare package versus package, and in many cases it should
be possible to compare even class against class. It may well
be - and I personally am sure in this - that some methods,
classes or even packages exist where GNU Classpath
implementation may actually be better. Yes, that is
not funny. During development I did a lot of side-by-side
comparisons at least for CORBA and HTML parser (both were
later continued by my friends) and have reasons to suspect
that Sun might not be an absolute winner in all possible
test cases. Also, it may be
other parts of code where the better implementation can be
written after comparing the two existing ones and
learning from mistakes of both sides. It is not frequent to
have opportunity to compare the two different
implementations seriously, package versus package or may be
even class versus class.
Hence it may well be that the best Free java runtime library
is yet to be written, uniting the best solutions from Sun's,
GNU Classpath and Apache Harmony implementations. Such
project can be an independent initiative, but it also may
start as a branch (or even head) of the GNU Classpath
project. Hence a serious hacker can find a new ways to the
future of the GNU Classpath. Ways that do not look just like
a gradual decay. Ways that lead forward though staying alive.