

Ask HN: I know Haskell, Clojure, Scheme. Should I learn CL? - adrusi

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?
======
tsm
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.

------
mooki
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!

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

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

