Sunday, December 13, 2015

More functional programming for Java 8 with Javaslang



Java 8 has introduced three new features about functional programming.

  • Lambda expressions.
  • Higher-order functions.
  • Streams API.
I think that Java 8 did a great step to integrate functional programming in its platform. But if you want to codify in a declarative way, or in other words, you want to tell to your computer what you want to compute instead of how, you need  more expressiveness or abstractions. Maybe Java 9 will provide new features to make our programs more declarative. But until now, libraries like Javaslang fills this gap, giving steroids to Java 8.

Javaslang provides structures like Tuple, Either, Match, Laizy, Promise, Try, and so on. Most of them available in languages like Scala, Haskell,...

We will see what happens with Java 9 ;)

No comments:

Post a Comment