Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: I know Haskell, Clojure, Scheme. Should I learn CL?
4 points by adrusi on Dec 11, 2011 | hide | past | favorite | 5 comments
I'm definitely comfortable with Haskell, and I learned Scheme through SICP and I've played with clojure enough to know my way around. I've done a little with common lisp, but not enough to claim I know it. Given my experience with related languages, would learning CL be useful for me at all, either academically or practically?


It's an interesting language since it's (obviously) all beautiful and Lispy, and has good support for functional ideas...yet very much encourages a "get it done" approach.

For example, here's something like how a Schemer might implement filter (although this seems long to me...am I missing something?):

    (defun filter (predicate list)
      (if list
          (let ((head (car list))
                (tail (cdr list)))
            (if (funcall predicate head)
                (cons head (filter predicate tail))
                (filter predicate tail)))
          '()))

But realistically, a CLer would probably just use the loop macro:

    (defun filter (predicate list)
      (loop for elem in list
         if (funcall predicate elem)
         collect elem))

So if you're interested in a non-castrated language that very deliberately tries to be practical (if at times inelegant)...it's worth a look. Pick up the book Land of Lisp if you're in a whimsical mood, or Practical Common Lisp if you're not.


It's hardly a language that will give you any new revalations in itself (if you already know the ones you mentioned). On the other hand, CL does have some grreeat books. Peter Norvig's and PG's books in particular are fantastic and will make you a better clojure/scheme programmer.

So yeah it's worth it!


C or one of the derivatives of C would be a great antidote.


I know C, java, JavaScript, ruby, python (sorta), etc.


but yes, Learning C about a year ago was quite useful for revealing more about how the hardware actually works.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: