December 05, 2002

New Java language features (JSR 201)

Java
James Stracha n in response to comments on JSR201: 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 J DK1.5.

I dont't think we actually need a full compiler for the extended language to translate to the 1.2 and 1.3 JVMs. Since most of these changes (except enu ms) are only syntactic sugars to the language, thus maintaining the semantics of the language, a source translator could do the job. Unfortunately the source translator would have to do quite a bit of type checking to generate correct code, which makes it a non-trivial piece of code.

I'm sure there must be some tools out there that already do Java parsing, syntax tree construction and minimal type checking. Perhaps we can reuse thos e to create such a source translator. Once the source is translated to plain Java, it can be compiled by any 1.2 and 1.3 compiler. Ant or Maven could automate this process and make it really painless.

Posted by ovidiu at December 05, 2002 11:40 AM |
 
Copyright © 2002-2016 Ovidiu Predescu.