Home » Tag Archives: Functional Programming

Tag Archives: Functional Programming

Functional vs Imperative Programming. Fibonacci, Prime and Factorial in Java 8

java-logo

There are multiple programming styles/paradigms, but two well-known ones are Imperative and Functional. Imperative programming is the most dominant paradigm as nearly all mainstream languages (C++, Java, C#) have been promoting it. But in the last few years functional programming started to gain attention. One of the main driving factors is that simply all new computers are shipped with 4, ...

Read More »

Functional Data Structures in Java 8 with Javaslang

java-logo

Java 8’s lambdas (λ) empower us to create wonderful API’s. They incredibly increase the expressiveness of the language. Javaslang leveraged lambdas to create various new features based on functional patterns. One of them is a functional collection library that is intended to be a replacement for Java’s standard collections.             Functional Programming Before we deep-dive ...

Read More »

Beware of Functional Programming in Java!

java-logo

This isn’t going to be a rant about functional programming, which is awesome. This is a warning about some practices that you are very likely going to apply to your code, which are terribly wrong!. Higher order functions are essential to functional programming, and thus, talking about them will help you be the center of attention at parties. If you’re ...

Read More »

Stack safe recursion in Java

java-logo

In this article, excerpted from the book Functional Programming in Java, I explain how to use recursion while avoiding the risk of a StackOverflow Exception. Corecursion is composing computing steps by using the output of one step as the input of the next one starting with the first step. Recursion is the same operation, but starting with the last step. ...

Read More »

Comparing Imperative and Functional Algorithms in Java 8

java-logo

Mario Fusco’s popular tweet impressively shows what the main difference between imperative and functional approaches to similar algorithms really is: Imperative vs. Functional – Separation of Concerns pic.twitter.com/G2cC6iBkDJ — Mario Fusco (@mariofusco) March 1, 2015 Both algorithms do the same thing, they’re probably equally fast and reasonable. Yet, one of the algorithms is much easier to write and read than ...

Read More »

From Imperative to Pure-Functional and Back Again: Monads vs. Scoped Continuations

java-logo

This post accompanies this video and won’t make too much sense without it Last month I gave a talk at the Curry On conference, a new conference co-located with the academic, programming language conference, ECOOP. Curry On is intended to bridge the gap between academia. My academic interests do not include programming languages, which I view as the sub-discipline of computer ...

Read More »

Functional Programming in Java 8 with Javaslang

java-logo

We’re very happy to announce a guest post on the jOOQ Blog written by Daniel Dietrich, Senior Software Engineer at HSH Nordbank, husband and father of three. He currently creates a pricing framework for financial products as project lead and lead developer. Besides his work, he is interested in programming languages, efficient algorithms and data structures. Daniel wrote the short ...

Read More »

Java 8 Friday: More Functional Relational Transformation

java-logo

In the past, we’ve been providing you with a new article every Friday about what’s new in Java 8. It has been a very exciting blog series, but we would like to focus again more on our core content, which is Java and SQL. We will still be occasionally blogging about Java 8, but no longer every Friday (as some ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials