
What Are the Differences Between Clojure, Scheme/Racket and Common Lisp? - tosh
https://stackoverflow.com/questions/11223403/what-are-the-differences-between-clojure-scheme-racket-and-common-lisp
======
tpfour
For me the most important difference is Lisp-1 vs Lisp-2. I had tried my hand
at Common Lisp a couple of times before trying Scheme. The latter immediately
felt "cleaner" than CL.

My favourite implementation is Gambit Scheme and I have currently stumbled
upon Gerbil (cons.io), a dialect built on top of Gambit. It's just fun to work
with.

------
iBelieve
I've found this page to be a nice comparison between Common Lisp, Racket,
Clojure and Emacs Lisp:
[http://hyperpolyglot.org/lisp](http://hyperpolyglot.org/lisp)

------
a3n
> Wrong site. stackoverflow is best for real programming questions you have.

> I always get confused about which post should go where.

There should be a stack Overflow site, not a faq but site, to discuss which
stack Overflow sites are appropriate for a particular post.

although all the interesting and useful questions posted to that site would be
flagged as inappropriate for that site.

~~~
cellularmitosis
I am surprised by how many times the first hit of my google query is a
stackoverflow answer which has been closed due to being “off topic”, “not
constructive” or whatever. I’m not sure how they benefit by being so active
with their topic policing.

~~~
alexeiz
This. The fact that they've closed so many interesting questions as off-topic
is the primary reason I'll likely never contribute anything to SO.

------
jnxx
My impresson is that the language differences are actually minor, but that
differences between platforms and runtimes matter.

Clojure supports concurrency very well, and being hosted n the JVM, it is
somewhat tailored to web applications. My impression is that it is far less
ideal for CPU-bound parallelism which does a lot of computation on primitive
types, since when there are more than a few primitive function parameters,
they need to be passed as boxed values, which interacts badly with the JIT
compiler. In practice, the advantages from support for parallel computation
seem to be out-weighted by that. Of course, for concurrent web applications,
this does usually not matter.

In contrast, Lisp implementations like SBCL or Chez compile to native code,
and they can be as fast as C.

Racket and SBCL are far better for scripting because they have a fast start-up
time.

Clojure and Racket have the best Library support which matches the "Batteries
included" slogan of Python to some degree. Clojure can access and use all
Libraries on the Java platform. In contrast, Racket, SBCL and many other Lisps
can access libraries written in C quite easily using the foreign function
interface, which is important for numeric and scientific programming. For the
latter domain, using the JVM is somewhat a disadvantage.

Racket can also execute Python code (a subset, I think) and call into Python
libraries. According to the documentation, it can also call into Python
extension modules. If this is correct, the difference in the number of
libraries available to Clojure should matter little.

SBCL has less libraries. So far, I was thinking of SBCL as being powerful but
a bit bare-bones, similar to C++ when compared to Java. However, one of the
comments on stackoverflow mentions that the library situation has changed
significantly in the last years.

I am also wondering whether the library aspect might be less important that it
seems. Traditional OOP languages put a lot of focus on code reuse in the form
of binary code reuse - including libraries which provide objects which can do
a lot of things. Java libraries are a prima example for this, and are famous
for their heaviness. Lisps, in contrast, and Lisp culture, seem to put more
focus on source-code reuse, because they put more emphasis on functional
programming. This seems to make binary code reuse somewhat less important.

~~~
legooolas
The libraries you use with SBCL are likely to be source rather than binary,
unless you mean via FFI to (likely) C libraries.

Quicklisp[1] has made a _massive_ difference to how easy it is to download and
manage sets of dependencies in a Lisp project. Try it out :)

[1] [https://www.quicklisp.org/beta/](https://www.quicklisp.org/beta/)

------
devmunchies
I was learning Clojure and OCaml last week (again) after doing a survey of a
handful of functional languages. I still haven't seen a good way to spin up a
really simple HTTP server like Sinatra or Express. Ones I did see either had a
huge bug, were more verbose, or had no "getting started" documentation. The
languages themselves are fun though.

~~~
ng12
And that's the problem. By picking these languages you're committing to
building a lot of stuff yourself. Sure, I'd rather be writing anything other
than JavaScript but you can't deny the Node ecosystem has solved a lot of
problems.

~~~
cultus
It's not really a problem for Clojure since it is on the JVM, so you get all
of those libraries for free. Java interop is very easy, especially due to
macros.

I've never used Clojurescript. I'm not sure how easy that is with Node.

------
btilly
I would have expected someone to point out that Scheme supports continuations
and the other two do not. But nobody did.

~~~
white-flame
I agree, but it should also describe what Scheme continuations are, compared
to the delimited function object continuations that are used in practice
elsewhere.

However, the notion is technically subsumed within the notion of a
"simplified" language, as Scheme continuations are a low level operation quite
often used to construct what other languages have out of the box.

