4 ms·
Start Hacking With Java 8
- gravitronic 14y ago.. no.
- campnic 14y agoEven though the features lag behind some of the more 'flexible, newer' languages, its exciting to see some of these come down the pipe. After using libraries like Google's Guava, I'm anxious to see some more functional-esque styles get integrated into java.
- darkstalker 14y agoIs this usable in Android?
- myko 14y agoI don't think so. It will be awhile before Dalvik supports the new bytecodes in Java 8. I'd like to know how long though. edit: or new bytecodes from Java 7 which will be required for Java 8 features
- magicSystem 14y agoThere's no new bytecodes in Java 8. Lambdas will compile down to invokedynamic calls (jdk7)
- hackerpolicy 14y agoWhich will be fine once Android starts supporting Java 7.
- amalter 14y agoYou can compile invokedynamic into reflection pretty easily. Obviously you lose the method call optimization, but you can keep the syntatic sugar. I would be very surprised if the backports folks didn't offer this within a few months.
- islon 14y agoYes, I know Java is behind every other language but speaking as someone who is stuck with Java in the workplace I heartily welcome these changes.
- leothekim 14y agoThe functional additions are very welcome and long overdue. The article also mentions virtual method extensions, which also look useful/necessary wrt binary compatibility.
- deleted 14y ago[deleted]
- cgh 14y agoAnother nice addition (that will never happen) would be to make variable declarations final by default, and adding a var keyword to declare them mutable. Also, pattern matching would be nice. Wait a second, this is all starting to look a lot like Scala.
- magicSystem 14y agoIDE can help here
- latchkey 14y agoLombok has 'val'. http://projectlombok.org/features/val.html http://projectlombok.org/features/val.html Lombok really brings some sanity to Java...