4 ms·
"Java 8 was SUPPOSED to an even bigger shift than Java 5" No, it's not, Java 8 is mostly lambdas and unlike generics which requires coordinate effort between th
by _death_dude_ 11y ago
"Java 8 was SUPPOSED to an even bigger shift than Java 5"
No, it's not, Java 8 is mostly lambdas and unlike generics which requires coordinate effort between the client side and the API side, lambdas are just syntactic sugar at client side and plain old interfaces at API side.
Because of that, Java 8 is supposed to be a smaller shift than Java 5.
- pjmlp 11y ago> lambdas are just syntactic sugar at client side No they are not, as they make use of invokedynamic. Certified JVMs must make use of the opcode and not generate anonymous nested classes, as many think they translate to.
- wlievens 11y agoBut at the library API level it's a much smaller mandatory change.
- _death_dude_ 11y agoNo, invokedynamic is not mandatory for lambda. It's a proposed translation, which has the advantage to make lambdas that do not capture values to be seen as constant by the VM. But you're right that certified Java 7 VM must have an invokedynamic opcode.