3 ms·
Asynchronous code is often more performant, but requires you to supply a callback if you want to take further action after the async code completes. In Java, th
by benmccann 11y ago
Asynchronous code is often more performant, but requires you to supply a callback if you want to take further action after the async code completes. In Java, this typically means subclassing Callable or some other class and you end up with lots of anonymous subclasses, which can be quite verbose. Java 8 introduced new syntax by allowing lambdas which removed the verbosity. Play 2.4 uses Java 8 and some of its examples shrank quite a bit in terms of lines of code.