I worked at several companies back in the day whose products were based on CL.
Iâve also spent the last 7 or so years working on a product in Clojure. So I have a lot of time invested in both, and they are both in my top 3 favorite languages.
I stopped using CL a long time ago because it lost momentum. That said, there are times I look back at it fondly when Clojure is driving me nuts.
In the end they both have things to offer. Clojure+JVM is great. Persistent data structures are nice and greatly facilitate FP. The Clojure language is still immature in various ways, and while itâs defmulti
is flexible, I routinely experience compilation-related issues with it that I never had with CL. In fact, compilation is where CL shines, including some things that Clojure forsakes, like argument checking at compilation time, something you can get a fair amount of in CL. Clojureâs âmaps all the way downâ has drawbacks for production code, IMO.
CL also has great things to offer. CLOS and CL generics are a treat. CLâs LOOP macro allows easy mastery of the toughest loops, whereas Clojureâs iteration takes a while to learn.
If youâre writing programs that have a mutable flavor to them i.e. where itâs all about state, such as simulators, schedulers, and so on, Clojure can lead you down some tough paths. The tools are there, but it isnât as natural as CL for some kinds of problems. On the other hand, Clojure offers a lot of threaded programming stuff (courtesy of the JVM) that was never officially standardized in CL (so ⌠no future
) in CL except as a vendor extension. Note that there is an open source package out there (name escapes me) that maps a standard set of CL parallel programming constructs across implementations, so it isnât as bad as it sounds.
There have been some efforts to bring some of the nice things Clojure mainstreamed to CL, including threading macros and syntax for sets, vectors, and maps. In a tribute to CL, the reason they can do this is because of CLâs support for readtables, which is not a thing that Clojure does. Anyway, if you know clojure and want to play with CL, look for packages that bring your favorite clojurisms to CL and get some of the best of both worlds.
Some people think the standards effort made it a mess. I canât argue against that, though it seems less crazy that CL has things like plists when you factor in the time at which the standardization was done. Personally I think a lot of very smart people worked very hard to dot all the iâs and cross all the tâs of a specification while coming from diverse lisp backgrounds. Remembering that adage about âcompromise means no party is totally happyâ I would say it was a success, not least because I can pick up the CLTL book and know that any implementation will have everything in that book.
Clojure didnât have to go through any of that, and many of its iâs are not dotted and tâs are not crossed. Random trivial examples: clojure.spec.never-ending-alpha and incomplete âvâ functions, i.e. Clojure has filterv and mapv, but no vâs for other functions like mapcat. Not everything should be lazy.
Iâm rambling. Theyâre both great. I use Clojure now because I really like having a JVM. I definitely miss CL sometimes, though I donât know if Iâd do a new product with it again due to lack of momentum. If only there were a CLTL3
(Fortunately a large number of CLTL2 people have retired, and so hopefully wonât read that and cringe).