Choice paralysis between CL and Clojure

7 points by TornadoFlame ↗ HN
I think I'm further hurting myself by asking this, but putting unnecessary fanboyism aside, which do you think (and why) is the best choice between these two to learn in 2021?

I've already had a taste of enlightening Lisp (Scheme) via SICP and actually feel more capable of understanding concepts that were previously unclear to me, however I'd like some practical reasons for choosing, since neither of these languages can help me much in finding a new job... So it would be a matter of confining them to my personal use.

I'm fairly proficient with Python and Go, plus I use Emacs a little bit for everything, though my Elisp is very basic. CL sounds like the logical choice because of SLIME, and Clojure sounds like the choice to avoid because of the JVM and the fact that I already know Go that plays in the same domain... But I'd like to hear some other opinions.

Thanks to all in advance

13 comments

[ 2.4 ms ] story [ 40.1 ms ] thread
Disclaimer: I use both at work and prefer clojure.

Common Lisp is huge, which is fine. In some concepts it is closer to traditional languages (mutable data structures, multiple inheritance OO, tools to write low-level efficient code). It is more extendable than clojure (reader macros, symbol macros, CLOS and MOP). With quicklisp you can find most of the libraries you might need.

Clojure is much more different from traditional languages. It puts immutable maps and vectors up front and expects you to work with data directly. Why is that preferable is hard to explain in a short post, if you're interested about the ideas I'd recommend watching Rich Hickey's talks like Value of Values[1].

> neither of these languages can help me much in finding a new job

I don't know about CL but there are clojure shops hiring. Depending on your employer if the JVM is being used you might get a chance to use clojure as well (or CL through ABCL for that matter). It's also used by some shops for the frontend. And for your own work you can often choose what to use. Both can be used as a scripting language (clojure through babashka[2]).

> CL sounds like the logical choice because of SLIME

I'm not sure what you mean.

> Clojure sounds like the choice to avoid because of the JVM and the fact that I already know Go that plays in the same domain...

I don't get the JVM hate. Sure, every platform has its issues, but the JVM is a highly tuned virtual machine that has decades of development behind it. It is cross platform. It is used for high performance projects as well. It has libraries for everything.

[1] http://infoq.com/presentations/Value-Values [2] https://github.com/babashka/babashka

Hi there, thanks for your answer!

> Disclaimer: I use both at work and prefer clojure.

Could you please elaborate? Just want to know how you use both at work! (i just can't really think of a 2021 scenario for CL, legacy code aside)

> I'm not sure what you mean.

Nothing at all, it was a typo. Swap SLIME with 'cl-lib, what i wanted to say what i wanted to say is that common lisp seems to have a certain level of compatibility in Emacs itself through this package, whether it is also feasible with Clojure, i ignore it

> I don't get the JVM hate. Sure, every platform has its issues, but the JVM is a highly tuned virtual machine that has decades of development behind it. It is cross platform. It is used for high performance projects as well. It has libraries for everything.

No no! It wasn't hate, i just stumble upon this article [1] and thought that the level of interactivity between CL and Clojure was clearly in favor of the former.

Sorry if I'm talking rubbish,I discovered the LISP ecosystem less than a week ago, CL and Clojure were just names before, all these dialects with all those implementations are confusing, because i don't have a clear overview!

Thank you again :)

[1] https://gist.github.com/vindarel/3484a4bcc944a5be143e74bfae1...

> i just can't really think of a 2021 scenario for CL, legacy code aside

I've been reading similar statements every years since I started programming in Lisp in around 2000, and could easily find more of the same going back in Usenet archives and whatnot before that.

"Against the tide of Common Lisp" (Usenet, 1986): https://www.usenetarchives.com/view.php?id=net.lang.lisp&mid...

"Considered Opinion: LISP is Terrible" (Usenet, 1983): https://www.usenetarchives.com/view.php?id=net.lang.lisp&mid...

Excerpt: "I have been attempting to evaluate LISP as a programming language for VLSI design, and after having read MANY LISP programs, I have come to the same set of conclusions about LISP as a programming environment. To make LISP usable, each particular interest group defines/modifies/extends LISP for its own purposes. The result is a set of islands of users, each with their own "flavour" of language, which they claim is the "one, true, and holy LISP. I like the LISP data structuring; As a programming language I rank it in the same class as APL: useful, highly unmaintainble, very hard to document, and VERY unportable."

Thank you, now it's worse than before!

No really, i get your points (through you other answers too).

I decided to just dive into CL, if you have some valuable resource, i would like to know!

> concepts it is closer to traditional languages

and in others it's not: it has fully introspective and reflective implementations, source-level interpreter implementations, Lisp on various levels (instead of using a static VM infrastructure) -> Lisp implementations largely written in itself incl. its compilers, highly interactive with integrated condition handling, a dynamic object system, image-based development, ...

Common Lisp is a multi-paradigm language, in which a wider range of your existing skills will find applicability (often, an idealized version of their applicability: doing the same things as before, with less friction).

Common Lisp is also better choice if you want to know about Lisp in the larger sense, because it is stepped in the Lisp history. Historic books and papers are much more relevant in a CL context than Clojure.

Common lisp because it's lisp all the way down which makes debugging in slime is better then clojure. With CL you can just have a buffer and start writing code, evaling snippets through slime. With clojure you have to have a project structure set up on disk first, it feels very java enterprisy , made for suits.
You don't need a project structure. You literally just need a file called deps.edn with a {} inside it.
I will start by saying that I use Clojure at work and I have tried to get into CL in my free time but just can't get myself to commit.

> Clojure sounds like the choice to avoid because of the JVM

The JVM is most definitely a big reason you SHOULD choose Clojure over CL in my eyes. It allows access to a vast selection of existing libraries.

I'm not sure what sorts of projects you would want to do with the new language but if you plan to do web development (or mobile dev with React Native or desktop with Electron) with your choice of Lisp then Clojure allows you to do that with ClojureScript.

(comment deleted)
If you know what you want to do and there is not much thinking needed, use CLojure.

Otherwise, use Common Lisp.