The Composite pattern is a very powerful design pattern that you use regularly to manipulate a group of things through the very same interface than a single thing. By doing so you don’t have to discriminate between the singular and plural cases, which often simplifies your design. Yet there are cases where you are tempted [...]
Continue Reading »
Tags: closureofoperation, composite, design, fold, functional, intentionrevealing, interface, java, language, oo, pattern, Programming, trick
Posted in Functional style, Programming • Comments Off
In functional programming, Map and Fold are two extremely useful operators, and they belong to every functional language. If the Map and Fold operators are so powerful and essential, how do you explain that we can do our job using Java even though the Java programming language is lacking these two operators? The truth is [...]
Continue Reading »
Tags: closure, commonscollections, eclipse, fold, foreach, fp, functional, guava, idiom, java, loop, map, mapreduce, pattern, poorman, Programming, reduce, syntax
Posted in Functional style, Programming • 6 Comments »
In the first part of this article we introduced predicates, which bring some of the benefits of functional programming to object-oriented languages such as Java, through a simple interface with one single method that returns true or false. In this second and last part, we’ll cover some more advanced notions to get the best out [...]
Continue Reading »
Tags: ddd, design, functional, interface, java, language, logic, optimization, predicate, Programming, specification, subsumption, testing, trick
Posted in Patterns, Programming, ddd • 2 Comments »
You keep hearing about functional programming that is going to take over the world, and you are still stuck to plain Java? Fear not, since you can already add a touch of functional style into your daily Java. In addition, it’s fun, saves you many lines of code and leads to fewer bugs. What is [...]
Continue Reading »
Tags: ddd, design, functional, interface, java, language, predicate, Programming, specification, trick
Posted in Programming • 6 Comments »
Now that enterprises have chosen stable platforms (JVM and .Net), on top of which we can choose a syntax out of many available, which language will you pick up as your next favourite? New languages to have a look at (my own selection) Based on what I read everyday in various blogs, I arbitrarily reduced [...]
Continue Reading »
Tags: .net, clojure, F#, functional, groovy, java, language, oo, platform, Programming, scala, syntax, trend
Posted in Programming • 4 Comments »