Views
- State: published
Found: A Reference Java Compiler
|
|
James Strachan writes:
What I'd really like (though knowing Sun this isn't going to happen) is that this JSR release a reference implementation of this compiler for the new Java langauge that spits out standard byte codes which work on any 1.2 or greater JVM. Then we can all jump to the new Java language (via a reusable Ant task or Maven plugin) without waiting until every end user of our software is on JDK1.5.
Right now take up of JDK 1.4 is very slow since there are still so many people using JDK 1.2 and JDK 1.3 in production. I'd like us to be able to start using this new language now, without waiting for the entire planet to upgrade to the 1.5 platform before we can take advantage of the new language features.
The same thing was alluded too by Guy Steele in his paper, he suggested that the Java compiler be open sourced. Nevertheless, it didn't happen, however all is not lost. There's another Java compiler out there that's open source and extremely robust, its the Jikes parser from IBM.
However, if you don't like hacking in C, you can also use the compiler that comes in Eclipse, it uses the same Jikes Parser Generator that Jikes uses, but its better its all written in Java! Furthermore, it has the cross JVM capability you are looking for, just look at the preferences in Eclipse. Also, the generics stuff is already in there, it was turned off when Sun decided to remove it from JDK 1.4.
I also wrote earlier that the AspectJ compiler extends from the Eclipse compiler. Now, all you need now is a Hygenic Macro facility and you can make up any language construct you like!
So, like I've been saying all along, language extensions in Java is a pretty exciting area to be in right now. All the tools are in place, its just up to you to make it happen.

