Hacker News new | ask | show | jobs
by yaseenk 3013 days ago
Java is backwards compatible though. Code that was written in the 90s will still compile and run on JDK 10.

It’s just now Java gets to iterate and improve more frequently and regularly.

Regardless there are still LTS releases (every 3 years) for people who lean more conservative.

1 comments

Not always and not quite. Here's an example of some type-foo with generics that works on Java 7 and not on Java 8

https://stackoverflow.com/questions/34659055/java-8-incompat...

If I read that correctly, the “breakage” is a bug fix, as that particular Java 7 compiler isn’t behaving according to the spec. You can argue that breaks backwards compatibility, but in the smallest, most innocuous way possible.
My understanding after reading the answer to that SO question is that the behavior in 7 was a bug. New releases of javac aren't required to be bug-compatible with previous releases.