Javaslang – the core functional library for Java 8 and beyond – allows us to start thinking in immutable values. Java 8 introduced some features to to support functional-style operations, such as Streams API and Optional. However for pure functional programming, it didn’t go far enough. On 23rd February, Grzegorz Piwowarek will talk at Voxxed Days Zurich about […]

Read more

What is declarative thinking? In an imperative approach to programming, we give commands to the computer. Why should we think more descriptively, and what does that mean in practice? We interviewed Kevlin Henney at Devoxx Belgium 2016. For the full talk at Devoxx Belgium 2016, see below: Declarative Thinking, Declarative Practice “Do this, do that. […]

Read more

The former parts of this series of articles analyzed several classic GoF patterns, Command and Strategy in the first one, Template and Observer in the second, Decorator and Chain of Responsibility in the third, showing how that they can be considered obsolete. In fact, when reviewed under a functional lens, it is evident that a […]

Read more

In the first two articles of this series we re-implemented, from a more functional point of view, 4 very commonly used GoF patterns. In this third part of the series, we will review 2 more: the Decorator and Chain of Responsibility patterns. These 2 patterns, despite their unquestionable usefulness, are probably employed less widely than […]

Read more

In the first article of this series, we started investigating how the most common GoF patterns can be reviewed and reimplemented in a cleaner and more concise way by leveraging the new functional features introduced with Java 8. In this second part, we will continue this process and revisit two other widely used GoF patterns: […]

Read more

This is the first in a series of articles where we will review many Gang of Four patterns under a functional light, showing how they can be re-implemented in more concise and often more flexible ways. Before analysing in detail the different patterns, let me start in an unusual way for a programming post: a […]

Read more

Pure functional programming is helping developers developing more robust and simpler programs, but it also helps them testing the behaviour of their application in a more predictable way. There are many different approaches to testing and verification of code, and we’re constantly reconsidering the best approach to make our code solid, by leveraging concepts like […]

Read more

Following my blog post covering Stream.flatMap() operator, we’ll also cover another important Stream operator called – reduce. Let’s jump in straight away with an example. Say we have a simple Person Bean: Our task is to iterate through list of people and find: The female with the longest name and print the details The longest female name only and print the details The […]

Read more

The state of Clojure report for 2015, led by consultants Cognitect, is now complete, and, it’s compilers write, there is strong evidence that the language is traversing the gap from being a “niche tool used by explorers and hobbyists” to assimilation with the contemporary enterprise development landscape. With the programming world increasingly looking to functional […]

Read more

We all have used design pattern in Java for decades. Most of those patterns were influenced by the capability of the language. The capability of the language, however, got better with Java 8. With lambdas, we will use some design patterns differently than before. There are other design patterns that we can use now that […]

Read more