Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Lisp should I learn? [closed]

People also ask

Should I learn Common Lisp or Scheme?

You have two main dialects to choose between: Scheme and Common Lisp. They each have advantages and disadvantages, but the differences between them are tiny compared to the differences between them and other languages, so if you want to start learning Lisp, it doesn't matter which you choose.

What is the most Common Lisp?

Interdental lisp – Interdental lisp is the most common and well-known type of lisp. It is caused by the tongue pushing forward between the front teeth. In the case of an interdental lisp, the s or z sound is pronounced like “th”.

Is Common Lisp faster than C?

At 25000 values, Common Lisp is almost 1.8 times as fast as the C version, and the compilation time is 65% of the total evaluation time. In Figure 2, for programs of depth 8, Common Lisp passes C at between 5000 and 6000 values, and the compilation time is 16.2 seconds.

Is Clojure the best Lisp?

Clojure is really your better bet. It is highly practical with a good community and excellent Java interop. You never have to worry about finding a good library. The syntax is also a bit more easily parsable than CL.


Clojure is an actively developed, modern dialect of Lisp. It's based on the JVM, so all the Java libraries are immediately available, and therefore also has Unicode support.

This is one alternative, not the One True Answer.


If you want avoid flamewars and you enjoy libraries go with Clojure. It's small, it's fast, and the community is helpful and non-dogmatic. It's Lisp minus the absurd cruft of the 1980s . It has a BDFL and if you have a good idea there's a damn good chance it will get implemented into the language.

I have toyed around with Common Lisp, it's a beautiful thing. I've completed the first 3 chapters and the Metacircular Evaluator in SICP in DrScheme, and that is beautiful thing as well. Of course, you will benefit greatly from learning these.

But, over time I have come to hold small languages dear to my heart. I won't lie, I love Javascript and I love C (and goddammit if every language doesn't have a C core at it's heart) because they are small.

Clojure is small. It is elegant. It is a language for our times.


Just pick one, and learn it. By the time you figure out the differences, you'll be in a position to choose again, if you chose badly the first time.


Contra Chuck, an advantage of Common Lisp is that it has a standard that implementations stick to and strive for, such that you can develop largely with SBCL (which has excellent type checking and inference) and then, say, deploy as an executable linked with C libraries (with ECL or others) or as a .jar making use of Java libraries (with ABCL), or with a Mac or a Windows-native GUI (Clozure, both). Common Lisp is amazingly portable across architectures and over implementations and over time, and Common Lispers make efforts to keep things this way, with the support of the language. As an illustration, one silly divergence of unstandardized behavior is the question "is this a special variable?" So I answered it across the implementations I use:

#-abcl
(defun special-variable-p (symbol)
  #+ecl(si:specialp symbol)
  #+ccl(proclaimed-special-p symbol)
  #+sbcl(equal '(:special t)
               (multiple-value-list-int:info :variable :kind symbol)))

which reduces, at read time, to nothing on ABCL (it has this already), to (defun special-variable-p (symbol) (si:specialp symbol)) on ECL, and so on. So I can put this in my .rc files and use the common function at the REPL. But this isn't very important: this isn't threading or variously-backed networking or a Communicating Sequential Processes library. This last example just has one #+sbcl/#-sbcl even as it runs on five implementations. Because it relies on code that's been carefully ported.

But what permits this (and other) advantages also poses its own challenge to the learner: Common Lisp is a very big language. It isn't something you can slurp up in a week or two, like I did Clojure (but my Clojure is already decaying with the breaking changes set to roll out - that language, although heavy with its own merits, reminded me by contrast of a lot of what I like about Common Lisp.) So you should read a lot of this page, and keep the HyperSpec a keypress away (for me, M-x hyperspec RET do-symbols RET is sufficient nearness to the Bible.), and think about buying a few books. I have Practical Common Lisp, just got Let Over Lambda, and will buy PAIP real soon now.

But even if Common Lisp is the True Answer, you won't completely waste your time by 'just picking' some deceptively flashy alternative (-- 'deceptive' because commonplace CL doesn't show you all that its macros can do, and it has more kinds of macros than anybody. The usual comparison is between bad CL and syntax-optimized alternative X). You'll still learn the basics, you can still use much of what you can read in SICP, On Lisp, The Little Schemer, etc. A lisp, even the wrong lisp, is still better than a non-lisp. (But you'll spend some of your time implementing parts of the right lisp, poorly, in the wrong lisp. Meta-Greenspun.)


Clojure is a great dialect of LISP that promotes functional programming. It runs on the JVM so you have access to any Java libraries you might be used to using. The site has great documentation and screencasts to help you learn. Another advantage is that it's really easy to install, unlike a lot of other dialects.

If you're just looking to grok the concepts Emacs (EmacsLISP specifically) is another alternative. It comes with incredible documentation, tutorials, and lots of code samples. Screencasts are fairly easy to find as well. One of the great benefits of Emacs is that the editor is written in LISP so the editor naturally has very good support for running, editing and debugging LISP. In addition, you can extend the editor to make your every day text editing needs easier while you learn LISP.