How to get Groovy with Java 8
summary
Compares a small Java 8 implementation (filter names with the Streams API and write per-name files with Files.write) to a concise Groovy script using setText; both examples run and produce output files, but Java 8 trades ceremony for the new APIs and lambdas. Benchmarks (JMH) show Groovy slower than static Java, yet enabling invokeDynamic brings Groovy near @CompileStatic speed; Groovy still wins for scripts, DSLs and features like tail recursion annotations and traits, while libraries (Ratpack/Gradle) favor a Java core for robustness.
AI-written summary · about
chapters (18)
- 0:00Introduction and speaker background
- 1:55Java vs Groovy syntax comparison
- 6:31Groovy features improving readability
- 7:14Java 8 as a game changer
- 9:02Java 8 vs Groovy code example
- 17:44Groovy script comparison
- 21:22Groovy advantages over Java 8
- 27:18Java vs Groovy in build tools
- 31:12Groovy's future with Java 8
- 35:53Binary compatibility and stability
- 40:10Risk assessment in language choice
- 44:15Rat Pack and Gradle philosophy
- 50:10Java and Groovy as complementary
- 51:16Lambda functions integration
- 57:19Groovy performance with invokeDynamic
- 1:00:08Java 8 new APIs and enhancements
- 1:08:37Default methods and traits
- 1:14:23Conclusion and Q&A
related talks
58mGroovy, Java, and Kotlin
01h 02mFunctional Programming in Java, Groovy, and Kotlin
01h 01mPolyglot Programming in the JVM
43mFunctional Programming in Java, Groovy, and Kotlin
47mJava for Small Coding Tasks
51mSecrets of top performance in Java revealed
01h 00mLet’s Get to the Rapids: Java 8 Stream Performance
37mEffective Java with Groovy & Kotlin
