Wednesday, January 12, 2011

Should I learn Lisp?

I had been asking this question myself every time I had found something (blog post, article, book title, etc.) interesting related to Lisp. But those “ugly” brackets put me away again and again :-). So, what was happen and why I changed my vision?

I think I’ve got three triggers to change my mind: a) friends of mine works with Gensym/G2 platform and they are really inspired by Lisp power; b) I saw several Rich Hickey’s talks about Clojure and the last one c) Paul Graham essays.

Then, I started googling to find other opinions about Lisp (when I say “Lisp” I mean Common Lisp, Scheme, Clojure and other Lisp dialects).

Lisp Quotes
Bill Clementson wrote about this:
“Usually, rather than trying to convince people … I feel it is better to just spread the "seeds" and let people convince themselves. This is often better done with quotes and/or stories because these often highlight some salient feature that resonates better with people than arguments do.”
Also, check Paul Graham Quotes List.
I like this one:

"Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot." (Eric Raymond, "How to Become a Hacker")"
Lisp Dialects
Here is the lisp of the major Lisp dialect, as for me:

  • Common Lisp (CLOS)
  • Scheme
  • Clojure
  • Dylan
  • Arc
  • newLisp
  • Emacs Lisp
I'm sure this lisp uncompleted, but from my point of view other stuff is too specific.

Additionally you should check this page to get some syntax overview: Lisp: A side-by-side reference sheet

I think there are two major player, IMHO: Common Lisp and Clojure.
Common Lisp is just golden standard for all Lisps. Plus, all major Lisp related books were written for Common Lisp.

I would choose Clojure for practical reason. It just has JVM background and can use Java ecosystem. And it's the major features. The other good point is that Clojure is much simpler than Common Lisp.

Beginner Lisp Books
Common Lisp:
Practical Common Lisp
Practical Common Lisp, by Peter Seibel, 2005
Programming Clojure (Pragmatic Programmers)
Programming Clojure, by Stuart Halloway, 2009

Instructor's Manual t/a Structure and Interpretation of Computer Programs - 2nd Edition
Structure and Interpretation of Computer Programs, by Harold Abelson, Gerald Jay Sussman, Julie Sussman

People suggest to choose one "lisp" for start. I think Common Lisp must be in your learning roadmap, but it shouldn't be a start point.

Development Environment
I've analyzed a lot of opinions and made an obvious (and expected) conclusion. Whatever Lisp you want to use Emacs is the only one true way for the real Lisp development.
Emacs is very powerful and very complicated text editor. I have to invest a huge amount of your time to be really productive with it. But real lisper can't suggest your other editors.

Even for Clojure people suggest to use Emacs.
Don't forget that you'll get additional Lisp on your shelf with Emacs - Emacs Lisp (elisp). It uses for Emacs scripting and you must know it to tune Emacs properly.

  1. I like Lisp after this small overview. This language has huge power and conceptual background which is different from what I've see so far. It's mean that Lisp can extent my conceptual horizon.
  2. I should chose the only one Lisp for start. It's no simple task. I think that Clojure is better choice for me as for Java developer. But, Common Lisp has big legacy (books, community and history) which is very interested for me. In any case List is just for fun. I can't use it on my work :-(
  3. I should invest noticeable amount of time for Emacs learning. And I don't like this.
  4. Unfortunately, I can't learn Lisp this year. Because it will be fragmented learning process. And I have such approach. I like to dive into the subject and live with it. I have to set List as a goal for 2012 year.