Blog

Articles, tutorials, and insights about functional programming in Java

Subscribe via RSS
Refactoring Object-Oriented Code Toward a Functional Style

Refactoring Object-Oriented Code Toward a Functional Style

A practical, step-by-step guide to moving Java code from a mutable, exception-driven OO style toward immutable, composable functional pipelines — without rewriting everything at once.

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.

Why You Should Upgrade to Java 25

Why You Should Upgrade to Java 25

Java 25 is the next Long-Term Support release and the most significant Java upgrade since Java 21. Here is a practical look at what it delivers, why LTS matters for production codebases, and how a functional-style library like dmx-fun benefits from the new language features.

Pragmatic Functional Programming vs Academic Purism

Pragmatic Functional Programming vs Academic Purism

Where does the line fall between adopting functional ideas that genuinely improve Java code and chasing theoretical purity that only adds ceremony? A frank look at what FP concepts are worth carrying into production Java, and which ones are better left in the research papers.

dmx-fun 0.0.10 Released

dmx-fun 0.0.10 Released

Version 0.0.10 brings sequence and traverse combinators to Try, Optional interop for both Result and Try, and a full set of Stream collectors for Result including stream(), toList(), and partitioningBy().

Railway-Oriented Programming in Java (Without Frameworks)

Railway-Oriented Programming in Java (Without Frameworks)

Learn how to model error-handling as two parallel tracks—success and failure—using pure Java and a Result type, eliminating scattered exceptions and making your business pipelines composable, readable, and testable.

Immutability in Java: An OOP Foundation

Immutability in Java: An OOP Foundation

Immutability is one of those ideas that sounds simple—an object doesn’t change after it’s created—but has surprisingly deep consequences for design quality, correctness, and long-term maintainability.

Functional Composition Patterns

Functional Composition Patterns

Explore powerful composition patterns to build complex functionality from simple, reusable functions

Welcome to dmx-fun Blog

Welcome to dmx-fun Blog

Introducing the dmx-fun blog - your resource for functional programming in Java