Groovy, in the light of Java 8
summary
Groovy claims that Java 8 is complementary, not redundant: Groovy closures coerce to functional interfaces (and even abstract classes) so existing code can call Java 8 streams, while Groovy keeps features Java lacks — default parameters, memoize, trampoline tail recursion, duck-typed polymorphism, and richer builders. The talk demos using the JDK stream API, Date/Time, Nashorn and a Groovy-to-JS transpiler, notes gaps (method reference syntax, annotations on types) and proposes enhancements like builders remain far more concise and optional can use Elvis and safe navigation for nicer null handling.
AI-written summary · about
chapters (32)
- 0:00Start
- 1:52A recurring question...
- 3:53What about redundancy?
- 5:43What we're going to talk about
- 6:47What's new in Java 8?
- 7:25New Java 8 syntax constructs
- 8:21Lambda expressions
- 13:58The various lambda syntaxes One parameter: no parens
- 15:23Closures vs lambdas
- 17:47Beyond: Closure default parameters
- 18:35Beyond: Duck typing polymorphism
- 23:07Neater Groovy builder!
- 23:30Arenit Groovy builders more readable and lean?
- 23:54Closure and method memoization
- 25:24Closure and method tail recursion
- 28:15Method references — 3 main cases
- 28:49Groovy's method closure
- 32:08Static methods in interfaces
- 34:19Default methods in interfaces
- 36:01Groovy Traits
- 37:23Simple trait
- 37:58Trait with state
- 38:29Multiple inheritance
- 39:11To know all about traits!
- 39:56Repeating annotations
- 42:18Annotations on types
- 44:40Groovy compile-time meta-annotations
- 47:30Date/Time API
- 50:34Groovy's functional style with the GDK methods
- 52:43Wrap something that can be potentially null
- 54:12Groovy truth, null handling, Elvis with Optional
- 56:32Call JavaScript from Groovy with JSR-223
related talks
58mGroovy, Java, and Kotlin
01h 02mFunctional Programming in Java, Groovy, and Kotlin
52mFunctional Programming with Java 8
43mFunctional Programming in Java, Groovy, and Kotlin
50m10+ new features you ought to know using Java 8
37mEffective Java with Groovy & Kotlin
01h 01mPolyglot Programming in the JVM
48mFrom Java to Groovy: Time for Adventure!
