Naïveté to Brilliance

Unlike Scala, even beginning learners of Clojure will experience the fun of functional programming almost immediately.

Converting the Rails function “simple_format” from Ruby

to Clojure (leaving out options)

illustrates the fundamental naivite (sorry, couldn't get the French characters to display in xml) of imperative programming with its silly reassignments, incidental state and mutability. It's laughing at this and marvelling at the sheer brilliance of Clojure in equal measure that make Clojure so much fun.

Posted: 21 February 2012

comments powered by Disqus