Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clojure for a lisp illiterate [closed]

I am a lifelong object-oriented programmer. My job is primarily java development, but I have experience in a number of languages. Ruby gave me my first real taste of functional programming. I loved the features Ruby borrowed from the functional paradigm such as closures and continuations. Eventually, I graduated to Scala. This has been a great way to gradually learn to approach non-trivial problems in a functional manner.

Now I am interested in Clojure. I know all the sexy features that make it enticing (software transactional memory, macros, etc.), but I just can't get used to "thinking in lisp". I've seen Rich Hickey's screencasts aimed at java programmers, but they are geared towards explaining language features and not approaching real world problems.

I am looking for any advice or resources which have made this transition easier for others.

like image 751
dbyrne Avatar asked May 28 '10 23:05

dbyrne


Video Answer


2 Answers

Its now 11 months after I originally asked this question. I've just started a new project to help beginners make the transition to clojure. Its called 4clojure, and it challenges you to solve fill-in-the-blank style interactive problems.

  • 4Clojure.com
like image 171
dbyrne Avatar answered Oct 12 '22 02:10

dbyrne


My first introduction to Lisp was: Paradigms of Artificial Intelligence Programming of Peter Norvig. It is a very readable and gentle introduction to many features of Common Lisp and functional programming concepts.

Starting directly with some Clojure books could be preferable for you, because there are several differences between Common Lisp and Clojure which may become confusing if you're trying to learn both at the same time.

At the same time, try to get hands on experience messing with the Clojure REPL, doing some exercises like Project Euler which you then can contrast with other Clojure and imperative Java solutions.

Furthermore, if you have any questions on Clojure programming and idiomatic style, do not hesitate to discuss your code with other Clojurians. There are several options to do this, such as: Clojure on Google Groups, the #clojure IRC channel on Freenode, Twitter via hashtag #clojure, and of course here on Stackoverflow!

like image 38
Michiel Borkent Avatar answered Oct 12 '22 01:10

Michiel Borkent