Blog

Articles, tutorials, and insights about functional programming in Java

Subscribe via RSS
dmx-fun 0.0.13 Released

dmx-fun 0.0.13 Released

Version 0.0.13 adds Either<L,R>, NonEmptyList<T>, typed Try.recover overloads, the fun-jackson and fun-assertj modules, a runnable samples subproject, and a full Developer Guide — plus a breaking package rename to dmx.fun.

Should All Business Logic Be Pure?

Should All Business Logic Be Pure?

Purity is one of the most valuable ideas functional programming offers — but insisting on it everywhere leads to a different kind of mess. Here is how to draw the line in real Java codebases.

Testing in Functional Programming: Why It Is Often Simpler

Testing in Functional Programming: Why It Is Often Simpler

Pure functions, immutable data, and typed errors remove most of the friction in unit testing. This post explains why FP code is inherently easier to test, and shows concrete examples using Java and dmx-fun types.

The dmx-fun Roadmap: What's Coming Next

The dmx-fun Roadmap: What's Coming Next

A personal project born from curiosity about new Java features has grown into a functional programming library worth sharing. Here is where it is heading.

dmx-fun 0.0.12 Released

dmx-fun 0.0.12 Released

Version 0.0.12 brings CompletableFuture adapters, Lazy<T>, zip3/zip4, Try.flatMapError, and a sweeping set of internal refactors powered by Stream Gatherers and Java record patterns.

Common Anti-Patterns When Writing Functional Code in Java

Common Anti-Patterns When Writing Functional Code in Java

Functional style in Java is easy to get subtly wrong. This post walks through the most common mistakes — from returning null inside a mapper to leaking shared mutable state into a stream — and shows how to fix each one.

Event-Driven Architecture from a Functional Perspective

Event-Driven Architecture from a Functional Perspective

Event-driven systems and functional programming are rarely discussed together, yet they fit remarkably well. Immutability, explicit error handling, and pure transformations make event-driven code more predictable, composable, and easier to test. This post explores how functional ideas sharpen the design of event-driven architectures.

Declarative vs Imperative: How the Mindset Changes

Declarative vs Imperative: How the Mindset Changes

Imperative code tells the machine what to do step by step. Declarative code tells it what you want. The gap between those two sentences is where most of the complexity in everyday Java code hides — and where the biggest readability gains are waiting.

dmx-fun 0.0.11 Released

dmx-fun 0.0.11 Released

Version 0.0.11 is the biggest release yet: Validated for applicative error accumulation, four checked functional interfaces, Tuple3 and Tuple4 with combinators, and an upgrade to the Java 25 LTS toolchain.