> I don't think this is true, is it?
>

Every version of Java has incremented the class file version and classes 
compiled for a newer version won't run on older versions.
So you can't use a version of javac supporting lambdas and target an older 
version. (javac has the target argument, but that's more or less useless 
for this usecase because it it requires a source argument with the same 
version number.)

To do some sensible real-world measurements you would need 

a) a corpus of code, in which lambdas are used idiomatically (this probably 
means a lot more frequent than with the current AIC syntax)
b) a compiler which understands lambdas and ...
c) ... would be able to generate classfiles with both the new class file 
version and the old class file version.

This is not possible currently with javac, and I don't see that changing 
for 8. (There is a chance that Retroweaver or a similar tool would add 
support for 8, though...)

A more degenerate usecase would be to measure with a 1.6-compatible corpus 
first, and then refactor it to use lambdas ... but I guess any results 
gained from that would be highly debatable.

I think clay's best bet is to use scalac as soon as the backend for 8 is 
available, because scalac doesn't suffer from the other restrictions and 
you can easily target different class file versions while using the current 
features.

-- 
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/-/kM5TMeZm2xwJ.
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