The confluence of FP and OO

Michael Feathers has a great blog post up today about how object-oriented and functional programming styles are suited to different portions of an application. Specifically, the object-oriented style fits the high-level application components. The original intention of OO was for objects to pass messages to each other, which is suited to a SOA style and … Read moreThe confluence of FP and OO

Humility in programming languages

John Backus (pdf) distinguishes two parts of a programming language: “First, its framework which gives the overall rules of the system, and second, its changeable parts, whose existence is anticipated by the framework but whose particular behaviour is not specified by it.” The framework part is all the built-in language constructs. The changeable parts are … Read moreHumility in programming languages

Dependency Injection vs Functional

At work, we use dependency injection to build up small, decoupled classes each with a single responsibility. DI lets us assemble these in multiple different ways, so we can use the same class for similar processes. This strategy of combining small pieces of functionality in different ways is also a goal of functional programming. Let’s … Read moreDependency Injection vs Functional

Guava: pidgin functional programming in Java

Google’s guava library provides a few constructs that let us use functional style in Java. Personally, I enjoy the slightly more declarative style that results, and have a new game of eliminating loops. Unfortunately, it’s Java. Attempting to do anything functionally is rather ugly. What do you think – worth it? or unreadable? Before: public … Read moreGuava: pidgin functional programming in Java