[Biojava-l] Location interface

Mr. A.R.N. Tivey ativey@hgmp.mrc.ac.uk
Mon, 30 Apr 2001 19:26:59 +0100 (BST)


> JSR #14,
> http://java.sun.com/aboutJava/communityprocess/jsr/jsr_014_gener.html, will
> provide parameterized types like C++ templates that should allow you to do
> some of what you want.  There still wouldn't be operator overloading but you
> could define plus() and minus() methods.  I couldn't tell if this one has a
> release target yet but I believe I heard it will be in the next major
> release (1.4?).  I personally am partial to strong typing and polymorphism,
> but to each their own.

It should be a nice feature - adding extra type-safety and saving a lot of
casting - but from the JavaOne abstracts this year: 

"Adding Generics to the JavaTM Programming Language (TS-2733)

Speakers
Gilad Bracha
Computational Theologist
Sun Microsystems, Inc.

Abstract

Generic types allow users to write programs that work uniformly over a
family of types ... An experimental compiler that supports these features
is publicly available and anticipated to be shipped in the product release
following Merlin."

aka v.1.4 . And on Sun's timetable it'll be at least 18 months before 1.5
is released. So not imminent (if you want to trust someone who calls
themselves a Computational Theologist).

######


As an aside there's a (mildly) interesting claim from the RFE in Sun's bug
parade for this feature: 

MON JUN 05 04:05 A.M. 2000 

Do you use javac from Sun's JDK1.3? Then you are running the generic
Java compiler and might not even know it! 

I was able to confirm rumors that Sun is shipping the gjc as their new SDK
standard javac compiler. Unfortunately, they crippled the Main class and
removed all non-standard options. I was able to patch the driver class and
re-activate the -gj option - it worked just fine.

While it is not trivial to do the patch, you can check at least inspect
lib/tools.jar and look for the files in com/sun/tools/javac/v8/resources -
you will find the extended options therein.

Unfortunately, Sun did not publish any official statements about their 
plans concerning genericity in Java - so they might have put gjc in their
product only to make the compiler go faster. However, the latest official
gj release is v0.6 ("v6"), so someone must have invested some 
time in it. 



Adrian