10 ms·
I started a big project at work using Common Lisp in 2017 and could not be happier. Sure, most nice features have trickled down to other languages, but they are
by hydandata 10y ago
I started a big project at work using Common Lisp in 2017 and could not be happier. Sure, most nice features have trickled down to other languages, but they are rarely as nicely integrated. And Lisp still has many advantages that are not found elsewhere: Unmatched stability, on-demand performance, tunable compiler, CLOS, condition system, and Macros to name a few. It has its warts too but which language does not?
I found lack of high quality library documentation a bit annoying, but a non-issue, there were tests and/or examples included in practically all of the libraries I have used so far.
Lastly, this rarely gets brought up, but I think Common Lisp has some of the best books available out of any programming language. The fact that it is so stable means that most of material, and code, from the end of 80's and 90's is quite relevant today, and new stuff is being written.
The biggest downside is that it makes JavaScript and Python revolting to work with. But I can still enjoy SML for example.
- shady-lady 10y agoCurious over why CL vs Clojure? Any comments.
- edem 10y agoI'm also interested in an insightful answer.
- Jach 10y agoWhy Clojure vs CL? The parent already mentioned some features that Clojure lacks, so if you don't care about features, what do you care about?
- spraak 10y agoThe child likely didn't know that
- SolarNet 10y agoI'm not OP, but there are a few I could see some mentioned in the OP's post in passing. * The common lisp condition system [3, 0] is a way better way to do errors. * Tune-able compilers [1] allow you to make better trade offs than even gcc allows for c, let alone Clojure's very opaque compiler. * CLOS [2] is a very powerful object system which clojure does not replicate (they have multi methods, and java classes, but not a meta class system; think python's meta class features but better (because of macros and compiler access) and with multi methods designed in). * Nice native interoperability (Clojure generally being on the JVM, and common lisp capable of direct calls and memory manipulation). That being said. Clojure's unparalleled concurrency features are amazing. I would compare them as: if Clojure is the Java of lisps, then Common Lisp is the C++ of lisps. [0] http://www.gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts.html http://www.gigamonkeys.com/book/beyond-exception-handling-co... [1] http://franz.com/support/documentation/current/doc/compiling.htm#decl-opts-1 http://franz.com/support/documentation/current/doc/compiling... [2] http://www.laputan.org/pub/papers/MOP.pdf http://www.laputan.org/pub/papers/MOP.pdf [3] http://axisofeval.blogspot.com/2011/04/whats-condition-system-and-why-do-you.html http://axisofeval.blogspot.com/2011/04/whats-condition-syste...
- Guthur 10y agoI have used both in production setting and can say that the tooling for most CL implementations is just plain light years ahead of Clojure, and there is no sign of it really improving. For Clojure the interactive debugging experience is just plain dreadful and for a dynamic language this is pants on head crazy imo. For me a dynamic language has to have a good interactive debugging experience because you have foregone the support of a static compilation and instead wish to reason about your program at runtime. But with the JVM stack traces and lack of interactive debugger Clojure just does not support you in this regard. And as a side note the lack of an identity print is annoying as well e.g. (+ (print 4) (print 4)) "4" "4" 8 (yes, it's easy to add...) Clojure's decision to use persistent data structures is good but it's really the only standout thing for me other than some syntax sugar like hash maps.
- Royalaid 10y agoHave you tried out recent versions of CIDER? I find it works good for that I need. But I have to say that the big problem I have is Emacs and its inability to handle long strings.
- Guthur 10y agoI may be missing some massive leap but until it does this http://malisper.me/2015/07/07/debugging-lisp-part-1-recompilation/ http://malisper.me/2015/07/07/debugging-lisp-part-1-recompil...
- Royalaid 10y agoAHHH, not quite the same, nor as good but sayid(https://github.com/bpiel/sayid https://github.com/bpiel/sayid) is a step in the right direction
- ane 10y agoCIDER has had debugging abilities like this for a year, there's a sexp based interactive debugger that allows injection, evaluation, stepping etc. Here's a 39 second video about it https://www.youtube.com/watch?v=A3JAlWM8qRM https://www.youtube.com/watch?v=A3JAlWM8qRM
- hydandata 10y agoObviously highly opinionated and personal statement coming, but Common Lisp is to Clojure what Meccano is to LEGO, and I have never been a LEGO person. If I work on a project where functional programming with emphasis on purity is required I will much rather go to ML family, which I think offers more natural way to express ideas in functional paradigm with beauty and integrity not even Lisp can match.
- 0xcde4c3db 10y agoNot speaking for hydandata, a few key points of CL as opposed to Clojure (which might be advantages or disadvantages depending on context and preference) include: - Defined by a standard (the text of the standard is available for free online as the Common Lisp HyperSpec [1]), not by a reference implementation led by a BDFL - Multiple mature implementations, both free and proprietary - Wholeheartedly multi-paradigm; has FP features, but also provides plenty of tools for imperative (notably including a powerful macro for loops) and (meta)object-oriented approaches - "Lisp-2" rather than "Lisp-1"; functions and variables are in different namespaces, which reduces name clashes but requires disambiguation in some places - Designed for implementation in a wide variety of environments, including being embedded as an extension/scripting language in C or C++ applications (see ECL [2]) [1] http://www.lispworks.com/documentation/HyperSpec/Front/index.htm http://www.lispworks.com/documentation/HyperSpec/Front/index... [2] https://common-lisp.net/project/ecl/ https://common-lisp.net/project/ecl/
- kakapupu 10y ago> Defined by a standard How does this help, compared to Clojure? > Multiple mature implementations Why wouldn't one free mature implementation be good enough? > Wholeheartedly multi-paradigm Exactly like Clojure. > "Lisp-2" rather than "Lisp-1" I can't remember which one Clojure is :) But I haven't had any problems with namespaces and the like. > Designed for implementation in a wide variety of environments So is Clojure, right? There's the CLR version, and ClojureScript too.
- lispm 10y agoClojure variants are incompatible in various basic ways, since they use the host language for various things. The underlying platform also restricts what the implementation provides. No TCO in JVM -> no TCO in Clojure. Numbers are internally floats in Javascript -> Numbers are internally floats in ClojureScript and use Javascript semantics, not Clojure-Semantics. Clojure: Clojure 1.8.0 user=> (/ 3 4) 3/4 ClojureScript cljs.user=> (/ 3 4) 0.75 Looks like these are different languages... Common Lisp implementations OTOH implement most of the standard. There is also more choice in implementations: * native implementations AND hosted implementations * actual Lisp interpreters or a mix of interpreters and compilers, interactive compilers, batch compiler * compilers written in Lisp itself with good error messages, forms of compile-time type checking/inference, and advanced error handling (like SBCL, CMUCL) * compilation to C, full embedding into C programs (ECL and others) * full embedding in C++ (CLASP) * compilation to shared libraries, embeddable into other applications * whole program compilers for delivery of compact applications (like mocl) The main Clojure compiler is written in Java and it shows... https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java https://github.com/clojure/clojure/blob/master/src/jvm/cloju... If one targets a certain host environment (JVM, Javascript, ...) then this range of options and choice might not matter, even hinder - besides getting a poorer version of interactivity. If we see a Lisp as a language on its own, then it matters a lot.
- kazinator 10y agoClojure is tied to the Java environment. Someone who has no use for or interest in that environment has no use for Clojure.
- ethagnawl 10y ago> Clojure is tied to the Java environment. I guess you're not familiar with ClojureScript and/or Clojure CLR?
- 59nadir 10y agoThat's sort of like the following: - I don't want a door here. - Ok, you don't like the wooden door here. You can have a plastic one or a steel door. With CL you're not tied to _any_ platform.
- mathw 10y agoLast time I tried to use Clojure CLR, all the useful libraries were JVM-only because they called out to JVM libs underneath.
- kazinator 10y ago"Clojure" is being used as a family name for similar, but incompatible dialects. If I were Hickey, I'd trademark it and enforce against these projects. Look at lispm's comment: https://news.ycombinator.com/item?id=13984011 https://news.ycombinator.com/item?id=13984011 It's not just the platform libs, but the semantics of things that really should be portable.
- platz 10y agoSBCL compiles to native code.
- sheepmullet 10y agoClojure makes certain language sacrifices to ensure great integration with its host platforms. Easy access to the tens of thousands of person years worth of effort put into the Java/JavaScript ecosystems in return for dealing with a bit of ugliness is a win in my books.
- cdegroot 10y agoIt's a loss in my books. I like Clojure but pretty much the only thing that's been putting me off is how the JVM "shines" through in lots of aspects.
- netmask 10y agowhich lisp interpreter did you use ?
- nameless912 10y agoCommon Lisp would imply SBCL, that's my guess at least.
- fiddlerwoaroof 10y agoThere are half a dozen CL implementations, for various purposes: sbcl, ccl and open source implementations with built in compilers. ecl is similar, but designed to be easily embeddable in C applications clasp is a newer one that's built on top of llvm (still unstable, as far as I can tell, but actively developed) abcl targets the jvm platform and, consequently, can gives you access to all the libraries in the Java ecosystem. And then there are commercial implementations like LispWorks and Allegro that have their own benefits: Lispworks has, I here, a very nice cross-platform GUI library and, although I don't know much about it, I suspect Allegro has it's own perks. And, because of the community's emphasis on avoiding implementation-specific behaviors, which implementation you choose isn't that big a deal: I regularly develop a project under multiple implementations, and seldom have major issues doing so.
- Guthur 10y agoIt baffles me that this notion of Lisp as an interpreted language still persists. Common Lisp is a compiled language for all non toy implementations, and in general Lisps have had compilers for decades.
- deleted 10y ago[deleted]
- lafytahoe 10y agoHow do you sneak something like lisp in to work?
- hydandata 10y agoYou build trust with stakeholders, usually by solving important problems until you reach a point at which having you solve a new problem is more important to them than what you solve it with. It helps if whatever tech you are introducing actually helps you in the task of solving more problems, increasing quality of solutions or reducing cost, in that particular order.
- kruhft 10y agoGood advice and similar to the strategy I use at work to use Common Lisp and Parenscript. They are yet to be completely accepted, but I'm working in it.
- Johnny_Brahms 10y agoWhich lisp implementation are you using? I had the pleasureof using AllegroCL at a gig I did recently. The environment has a bit of a learning curve, but once everything clicks it is like heroin. I ended that job a couple of months ago, but I still have wet dreams about it.
- lafytahoe 10y agoWas it just Allegro CL? or Did you also use it for other Franz Products? We use it at work for freebsd and it's pretty nice.
- fny 10y agoCan you elaborate on your use case?