Articles Tagged ‘functional’

Next Steps to Pattern Matching in Java with Java 12 and Switch Expressions aka JEP 325

Sunday, December 30th, 2018

It is interesting to see how the Java language evolves over time. One thing that I have always missed is pattern matching in a way similar to languages like Scala.

Now there are different JDK Enhancement Proposals (JEP) aiming at bringing us a little bit closer to pattern matching, especially JEP 325 aka Switch Expressions that are included in the current Java 12 preview or JEP 305 aka Pattern Matching for instanceof.

In the following article, I’d like to demonstrate how to use switch expressions in our applications.

(more…)

Using Deferred Objects and Promises with Java 8 and JDeferred

Sunday, September 27th, 2015

Promises may help us when dealing with asynchronous code and we need to merge, pipe or track the progress and the results of single parts of computation in our applications.

In the following tutorial I’d like to demonstrate a small library, JDeferred that helps us for this specific use case.

(more…)

Playing with Java 8 Lambda Expressions

Sunday, September 22nd, 2013

Many articles have been written about JSR 335 aka Lambda Expressions for the JavaTM Programming Language but I like to try new things out for myself and that’s why I’d like to share my snippets here.

(more…)

Aspects of Functional Programming in Java

Monday, July 16th, 2012

Functional programming is a trending topic these days and a lot of Java programmers are hot for the features that modern functional programming languages might offer.

Waiting for Java 8 and native closure support is a nice thing but for now we’re going to take a look at several Java frameworks that are trying to implement typical structures from those functional languages where possible using the capabilities of the Java language to emulate elements like higher-order-functions, closures, options and others …

(more…)

Snippet: Mixing Scala, Java in a Maven Project

Friday, March 23rd, 2012

Having just returned from the Atlassian Camp 2012 I just toyed around with Java and Scala and wanted to share the following snippet that demonstrates how to mix code from both languages in a Maven project using the maven-scala-plugin.

(more…)

Search
Categories