Which is the best book on Lisp, and which Lisp should I learn?
>inb4 SICP, it only covers the basics of scheme afaik
Name:
Anonymous2012-09-27 19:27
Lisp is the most deceptively easy programming language that I know of. I could literally teach a 7 year old most of the useful syntax of Lisp in a half hour and that child would be able to read most Lisp programs even though he/she would not fully understand what the program does. Lisp is just lists of data that can be worked on by optional prefix functions. Lists are built with cons and taken apart with first and rest. Pattern matching, mapping functions, and branch statements are all easy to understand. Recursion is slightly tricky but can be explained with enough persistence. The result is that there are thousands of "Lisp programmers" who know the syntax of Lisp but cant program in Lisp. Its possible to read Lisp books and understand everything but not understand anything having to do with Lisp programming. Its not a joke to refer to Lisp as Expert Programmers because it does take a lot of expertise to program in Lisp beyond a superficial syntax level.
Much of the modern functional programming is being done by mapping functions, like calling each in Ruby:
5.each {|a| a + 2}
this looks like Smalltalk style of programming where you all calling a method of an object. What is actually going on is that you are mapping a high order function over a lambda. Blocks in Ruby can function as lambdas. This is the style of functional programming that is used in Scala, Clojure and F# and is much more concise than the recursive version of this function that you would make in Lisp or Haskell:
(def suckyrecurse (a)
cond (> a 0)
(+ (first a) (suckyrecurse (rest a)))