Yet Another '1.x on 1.4' question... but wait! This one's different!
So, after faithfully using Jikes (Best. Compiler. Ever. RIP) for many years, I've decided I'm too far behind the times, and I've moving back to javac for 1.5 and 1.6.
However, the applications I'm writing must have the biggest reasonable userbase (usually in situations where the users are unable to upgrade their JVM), which is 1.4 given the classes I use.
I've read some of the other threads about 1.5 on 1.4, but I'm still not clear. It seems to me that there are some 1.5 constructs that can be represented perfectly in 1.4 (for example, the newfor could be represented as a standard(for Iterator i = thing.iterator; i.hasNext(); ). I'd appreciate it if someone could give me simple answers to the following before I start rewriting a bajillion lines of code.
For these, I guess I'm asking not 'can it run on 1.4?', but 'will it run on 1.4?' - that is, will it be transparent and supported? Or is it a case of 'it might run... unless there're sunspots that day.'
a) Generics. Surely this is just sugar, and can be compiled into something 1.4-friendly?
b) Enhanced for. Again, I can't see why this would need a change in the bytecode.
c) Autoboxing. Again, more sugar.
d) Typesafe Enums. Ah... I think this might be a problem. I can't see a trivial way of representing this in 1.4.
e) Varargs. Nope. I think this'll require new bytecode.
f) Static imports. Again, 1.5 bytecode only?
g) Annotations. I'm going to pretend I know what these are, and scoff at the obviousness of the answer to this question. Pah!
So I think if I stick to Generics, the enhanced for, and Autoboxing, my code should work on 1.4. Does that make sense?
Or should I just bit the bullet, use all the new features, and rely on the Retro-* applications to cross-compile?
Any thoughts or advice gladly received.
Addendum : Jikes, why'd you have to die? Why?

