I have been attending talks on functional programming languages at NFJS over the past couple of days. I have to admit it, I am really taken with the power of Scala and Clojure to tackle problems that Java cannot handle. I even purchased a Clojure book to add to my “languages to take a good hard look at” stack. I really believe that it is true that the functional languages have a lot to offer.
However, let’s not loose track of one really powerful tool that the Object Oriented world provides to us. This is the way to model the world in a more natural way. Since we do this all the time in Java and other object oriented languages, we take it for granted now. But the advantage that this modeling the world in our mind and our code is tremendous. One of the biggest constraint on developing software is the ability to hold in our minds the mental model of what the code is doing and how it is doing it. Once, you do this – you “know the application”. Having the ability to break the world up into chunks that more easily fit allows us to more naturally build applications without the complexity drowning us out.
I am wary of the temptation to “throw the baby out with the bathwater” to go to pure functional and leave objects behind. This is way Scala seems like a pragmatic solution, since it allows you to turn the dial back and forth from the Object Oriented way of doing things to the functional side.
That being said, I still intend to learn Clojure next instead of Scala. Why? Because to learn a new language that is a new way of thinking, I would prefer not to have an alternative way to fall back to old familiar ways of thinking. That way you can really get a new perspective on things to see what the true functional side has to offer. And no, I am not hard core enough to learn Haskell.
One thing is for sure. The future is multi-core.