Either make new versions of Java 100% backwards compatible, or support them for a long time. The end.
-John
Either make new versions of Java 100% backwards compatible, or support them for a long time. The end.
-John
Code written for Java 7 runs perfectly on Java 8. Code that uses new Java 8 features doesn't run on Java 7 though, because those features didn't exist then. You upgrade the Java runtime to Java 8 and then it supports the new features. Simple, no?
Ummmmmmmm...no. Why do you think (paid) maintenance options exist?
We have a project three months on so far making our Java7 code work with Java8.
We have several products that use the JVM from various vendors stuck on Java6 because it won't run on Java7 or Java8.
What crazy thing were you doing that required a 3+ month rewrite?
e.g.
for(Object a:list){
a.doSomething();
}
In java6 it was equivalent to for (int i:i<list.length();i++){
list.get(i).soSomething();
}
In java7 it was done like this Iterator iter = list.iterator();
while(iter.hasNext() {
iter.next().doSomething();
}
The original programmer had overridden the get method but not the next method in the iterator method. (Actually just called toLowerCase on a list of strings).Oracle did nothing wrong, the programmer only partly overriding the list implementation was broken. This kind of programmer error is too common and is normally the reasons that upgrades become an issue, i.e. its the equivalent of using undefined behaviour in C and then scream when your compiler upgrade burns down your house.
At any rate, all of the java 6/7 code I've ever had has ported to java 8 without any changes. Assumed it was the normal experience.
Is it really Oracle's fault?
I don't know if they care. At some point, people will rebel, but I can't predict where that tipping point is.
JVM however is a different matter.