Going Functional


Context Driven Developent was an experiment to see if object orientation could be improved by separating state and behavior. While working with CDD  I became more and more convinced that this separation was a good idea, but that intertwining data structures and functions into classes and objects was reducing composablity and code reuse. The information hiding we strive for in object orientation is introducing new problems and often misses its goal to preserve encapsulation, which often is broken when the context needs to be changed.

Some years ago I was at the JFokus conference and listened to Neal Ford  He was excited about a relatively new functional language called Clojure  When he showed us the syntax of the language, I thought "That can't be right!" because it differed too much from what I was used to (assembler, C, C++, Java and Scala).

A couple of years later I came across a few videos that I can highly recommend: Simple made easyThe value of values and Are we there yet? all by Rich Hickey. I immediately fell in love with the concepts presented in these videos and realised that this was a man who knew what he was talking about. It was particularly interesting that he was talking about foundational concepts, such as time and values, but which weren't a common subject for software engineering talks.

So now I became a little puzzled; how could the author of all these excellent ideas about software engineering have created a language that was so crappy? Then I realised that it might not be Clojure that's the problem, but rather my years of indoctrination with imperative programming and object orientation. I figured that now would be a good time to explore this theory by learning functional programming through Clojure.

I will soon begin a series of blog posts where you can follow my steps into the land of Clojure and the functional world!

Regards,
Joakim Tengstrand

0 comments

Post a Comment