Why learn obscure languages like Clojure?

One of the questions I get asked, quite rightly, by the sales and business development people in our company is why bother with learning Clojure, or even Scala, as none of our clients will use it?

So, I could explain how:

  • Functional programming tends to result in a smaller code base that’s easier to test.
  • Programming with immutable data structures makes reasoning about the impact of multiple threads easier.
  • Concurrent programming support like Akka, atoms, software transactional memory and agents mean modern massively concurrent applications are easier to construct.
  • Clojure encourages developing applications by composing small lightweight libraries rather than large heavyweight frameworks which makes swapping out implementations that don’t support future requirements or adding new functionality much easier.
  • Developing with tools like a REPL (Clojure) shortens the feedback loop to seconds making developing quicker and safer.
  • Functions are composable to make for better reuse at different levels.
  • Meta programming using structures like traits or macros makes developing Domain Specific Languages that express the problem space easier and hence focus on the actual business problem.

However, none of this matters to sales, business development people or most of our clients. They will argue getting large numbers of developers with experience in these languages is hard to impossible.


So why bother?

  • Because these languages generally self select good developers.
  • Because developing in these languages means solving algorithmic problems which develops good problem solving skills.
  • Because developers who have more than one programming language tend to learn other more quickly and are more versatile.
  • Because developing in these languages is fun and that promotes better staff retention.
  • Because techniques beyond OO expand a developers armoury to tackle real world problems.
  • Because developers exposed to smaller, functional code bases tend towards writing cleaner, easier to maintain code and this reduces the overall ‘cost of ownership’.

But if you don’t want any of this, sure don’t bother to learn anything. Go back to writing COBOL, or assembler. Nothing wrong with those languages of course but things move on.

————————————————————-

[Update Jan 2016]

Since writing this in Sept 2014 I’ve moved on from the organisation concerned and they’ve adopted Scala. However, the driver to do so was purely client demand, they had clients who wanted to use it and therefore saw a demand that needed fulfilling. I suppose I should be glad the clients have foresight but I feel a consultancy should lead the way.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s