Discovering Functional Treasure in Idiomatic Groovy
Groovy is a dynamic language on the JVM. Groovy supports programming in multiple paradigms - imperative, object oriented and even functional programming.
When I started using Groovy with Java background, the code used to be mostly imperative. As I explored the language in detail, I realized the power of idiomatic code. While the attempt to write idiomatic Groovy code helped me to realise the benefits of functional approach, thinking functionally resulted in better code too.
In this talk, I will demonstrate functional programming constructs in Groovy and show how to use them effectively. I will provide plently of examples to help the audience realize the benefits.
Outline/Structure of the Demonstration
- Closures in groovy as building blocks for functional programming
- Closures as first class constructs
- Higher order functions
- Functional composition
- Making use of powerful FP related techniques like Memoization, immutability, and lazy initialization
- Functional style in Groovy JDK (favour immutability, closure as parameters etc.)
- Map reduce operations
- How functional programming principles can help developers
- What are the functional programming support available in Groovy
- How idiomatic Groovy embraces functional programming principles
Groovy developers, Java developers, language explorers