On Tuesday, October 2, 2012 10:36:49 AM UTC+2, fabrizio.giudici wrote:

> On Tue, 02 Oct 2012 05:21:06 +0200, Josh Berry 
> <[email protected]<javascript:>> 
> wrote: 
>
> Definitely. Java is mostly backward compatible and I feel Java 8 will be   
> the first exception. 
>
>
This doesn't make much sense to me, but perhaps I'm missing something. To 
wit:

* All javacs, from 1.1 to 1.7, all retained the ability to compile 'old' 
code (code written for e.g. java 1.4 compiled on a javac 1.6), and emit 
bytecode which does the same thing, but only runs on more modern JVMs. This 
did occasionally cause warnings (such as a billion raw types warnings when 
compiling j1.4 code with j1.5 without -source 1.4), and, in rare cases, did 
not work at all (assert keyword). As far as I know, Java 8 will be no 
different!

* All javacs, from 1.1 to 1.7, all retained the ability to fully emulate 
old compilers by settings source, target, and bootclasspath to the older 
version. In rare cases this does not work (yes, no java release has ever 
truly been backwards compatible, but in cases which wouldn't come up except 
in extremely strange situations, usually where the old code was pretty much 
guaranteed to be buggy or at least intentionally written to cause issues). 
As far as I know, Java 8 will be no different!

* All javacs, from 1.1 to 1.7, DO NOT emit bytecode which is capable of 
running on a JVM associated with a previous version. In this sense javac8 
will not be 'backwards compatible' but then **NO JAVAC EVER** can make that 
claim. You can use -target X to change this, but you can't mix -source Y 
and -target X where Y exceeds X, and this has been true for as far as I 
know all javacs. There was a special third party tool which could take 1.5 
class files (compiled with generics) and mix them down to 1.4 versioned 
class files that still worked, so that you could write code with generics 
and compile it into class files that would run on JVM 1.4s. This was NOT 
written or endorsed by Sun.


In conclusion: What makes java 8 so special here?
 

> -- 
> Fabrizio Giudici - Java Architect @ Tidalwave s.a.s. 
> "We make Java work. Everywhere." 
> http://tidalwave.it/fabrizio/blog - [email protected] <javascript:> 
>

-- 
You received this message because you are subscribed to the Google Groups "Java 
Posse" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/javaposse/-/prB9dxxXZOAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to