3 ms·
I tried once more to get lambdas working, but at this point, I'm not sure if it's a bug in the JDK as it's still in beta or if it's Android. Log though for any
by yareally 13y ago
I tried once more to get lambdas working, but at this point, I'm not sure if it's a bug in the JDK as it's still in beta or if it's Android.
Log though for anyone who's less tired and curious:
https://gist.github.com/b0d095fbd1ccd4b28fe8 https://gist.github.com/b0d095fbd1ccd4b28fe8
- spullara 13y agoLambdas are in JDK 8 while Android supports JDK 6. This adds support for some of the features of JDK 7. That said, you could backport Lambda to JDK 6...
- yareally 13y agoI'm sure they can be. I'm just at a dead end for the evening and way past the time I should be programming (I was the submitter/author of the OP), thanks though for the encouragement :) I was just going off the educated guess (without digging through the jdk8 source) that lambdas, like most other syntax features on Java, are just syntactical sugar that does not modify the underlying bytecode since jdk6 and so does not require significant code changes to get it working. Though of course I could be wrong, but I'll deal with that later on in the week.
- spullara 13y agoJDK 8 implements lambda using features in JDK 7 like Invokedynamic. However, they could be implemented as syntactic sugar on top of anonymous inner classes — they just wouldn't be as efficient.
- timv 13y agoI have a prototype (only partially implemented) on a source translator from java 8 (lambdas) to java 7. https://bitbucket.org/tvernum/syntactic/wiki/ConvertingJava8To7 https://bitbucket.org/tvernum/syntactic/wiki/ConvertingJava8... Happy to discuss if you're interested. Drop me an email - User: tim Domain: adjective.org But work is pretty busy right now, so I can't commit to much development time.