5 ms·
[Ask HN]: Clojure - why the optimism?
What is the reason for Clojure creating this optimism within the lisp community?
Has it succeeded where other lisps have failed?
Or is it just the JVM that all the sudden makes it cool?
If other lisps never made it into mainstream, why would Clojure all the sudden nail it?
- ThinkWriteMute 17y agoThe JVM is actually what is keeping me from Clojure. A crazy reason, for sure, but Java has pretty much burnt all my fingers.
- jasoncwarner 17y agoThat is a crazy statement! I can understand not liking Java (same boat here), but the JVM and Java are two completely distinct things! Languages like JRuby and Clojure, which are fantastic languages, have near zero to do with Java. In fact, you can do most everything you want to do and NEVER touch java code. You can, however, access the Java libraries if you so choose (hence the power of working within the JVM). Not liking Java should never be thought of as not liking the JVM.
- ThinkWriteMute 17y agoI think you've convinced me. Hmmmmm...
- rdtsc 17y agoI agree. The best thing about Java was the library ("One library to rule them all..."). The language was so, so, mainly a better C++ + GC. I never liked it, but Swing, threading, BigInteger, AWT, man! coming from C++ it was a boon. The next thing I moved to Python, there I found the library and the language fun to use. Now I am starting to look back at JVM because of Scala and Clojure.
- Andys 17y agoWhat if the JVM was one of the reasons you didn't like Java?
- hga 17y agoWait a while; Rich has started thinking about the rewrite of the Clojure compiler in Clojure and that will provide a great foundation for other back ends (LLVM looks tasty).
- yummyfajitas 17y agoOne of the big problems with lisp (and other such languages) is library support. Being on the JVM and making java easy to access makes that a moot point. So yes, the JVM does make it cool.
- gruseom 17y agoCommon Lisp has two strikes against it: it's old and its community is dysfunctional. A lot of people attracted to the idea of Lisp, but repelled by one or both of those attributes, have found a home in Clojure. It's much too early to tell whether Clojure will prove a technical success in the long run (let alone a worthy successor to CL, which, for all the things people say they don't like about it, is one of the magnificent achievements of computing).
- hga 17y agoTo continue to my favorite Lisp family prior to discovering Clojure (and who knows, it still may end up being my favorite :-), Scheme: Is less old and has a less dysfunctional community: Like Clojure, the community took the opportunity to dispense with a variety of old cruft that's still in Common Lisp. It has a couple of processes that push the standard forward; the one for base language changes has been very slow prior to R6RS, but even that moves a lot faster than Common Lisp, which is essentially stuck in amber. Although the process that produced R6RS seems to have been largely rejected by the community (as well as the product) ... so we'll see what the R7RS effort comes up with. Scheme implementations are less standardized that Common Lisp ones, and this matters in some important ways, e.g. there's no accepted standard for modules (packages/namespaces/whatever). Frequently it takes some effort to port code between the different implementations because non-standardized features like threads were used (which Common Lisp doesn't have a standard for either). No one's ever figured out a widely accepted FFI for either, so Clojure wins big there. Many would say the Scheme language standard is too small and Common Lisp too big; Clojure aims to be just right.
- gtani 17y agoTim Bray, Ted Leung, Cliff Click asking hard questions bout STM/MVCC vs other concurrency mechanisms;. http://www.tbray.org/ongoing/What/Technology/Concurrency/ http://www.tbray.org/ongoing/What/Technology/Concurrency/ http://www.sauria.com/blog/2009/10/05/the-cambrian-period-of-concurrency/ http://www.sauria.com/blog/2009/10/05/the-cambrian-period-of... http://groups.google.com/group/clojure/browse_thread/thread/5c7a962cc72c1fe7?hl=en http://groups.google.com/group/clojure/browse_thread/thread/... http://blogs.azulsystems.com/cliff/2008/09/jvm-language-su.html http://blogs.azulsystems.com/cliff/2008/09/jvm-language-su.h... http://wiki.jvmlangsummit.com/pdf/36_Click_fastbcs.pdf http://wiki.jvmlangsummit.com/pdf/36_Click_fastbcs.pdf
- hga 17y agoWhy Clojure looks like it might be the "future of Lisp" (to quote Dan Weinreb (he said something to that effect in his ITA Google talk)): As I noted in my earlier posting, many would say the Scheme language standard is too small and Common Lisp too big; Clojure aims to be just right. It's not particularly multi-paradigm; rather, it's determinately functional and aimed at the multi-core/multi-thread "future" that's now arrived. It's "secret sauce" is a data structure (http://en.wikipedia.org/wiki/Hash_array_mapped_trie http://en.wikipedia.org/wiki/Hash_array_mapped_trie) that solves the functional programming trivial update problem ("changing" one of the built in sequence types is O(n), where n is a max of 32 and more like 5-6). With the above immutable data as base, it provides a variety of methods to manage multiple threads, e.g. STM (which has a much better chance of working in a functional language than trying to bolt it onto an imperative one), "agents" which are much like actors, but they can safely share (immutable) data and so on. It provides a general approach to lists, vectors, maps and sets and makes the latter first class citizens. Rich Hickey took the opportunity to ... update the syntax to heavily and appropriately use vectors (they are denoted by square brackets) and many people like this (I don't :-). It has a Common Lisp style macro system with as I understand it some extra features that make it safer than Common Lisp's. And the proof is in the pudding: it appeared out of the blue in 2007 and has seen a lot of uptake. It is already being used in production systems (e.g. Flightcaster). For this old Lisp hand (1979), it provides hope I haven't felt for Lisp since the mid-late '80s.
- hga 17y ago"If other lisps never made it into mainstream, why would Clojure all the sudden nail it?" Very good question; here are my guesses: We are exiting a Dark Age when the use of non-mainstream languages was nearly impossible (I suspect this has to do with the dot com bust: companies just don't have the money they used to have to throw at "safe" mainstream choices). I strongly suspect PG's success story and thorough explanations of why Lisp wins made more people willing to give Lisps a chance. The more varied syntax (e.g. heavy and appropriate use of vectors which are denoted by square brackets) finds favor with a lot of people who think LISP stands for Lots of Irritating Sets of Parenthesis. The multi-thread/multi-core "future" is here today and many have come to the conclusion that functional programming seems to be the best approach we can see today (there's been a lot of research into this since the '80s or earlier, nothing else has really stuck to the wall; note that Microsoft's F# dialect of OCaml is perhaps the first "mainstream" functional language). Lisps have always had a good story there as the first widely used functional language (well, technically most of them are multiparadigm but strongly functional), with a strong mathematical basis (the lambda calculus). Clojure takes full advantage of this. Apropos of the above, Haskell, the ML family and maybe Erlang were probably the only more popular strongly functional languages prior to Clojure, but for many they are harder to master; Lisps are more straightforward, they are dynamically typed, etc. Basing it on the JVM makes a big difference: for some it provides a warm and fuzzy since Java is so widely accepted and the Java/JVM ecosystem is so big and healthy. For many this provides an easier path to getting started, and if you want to get real world stuff done quickly, there's all those Java libraries and packages that can easily be directly called from Clojure and that can call Clojure. (Actually, running on the JVM makes it easy for pretty much everyone to get started on most any platform, just download the .jar file and run it in the JVM that most likely is already installed on your system.) Rich Hickey has made a lot of good choices in designing the language and its core libraries; it "feels" like a good fusion of Scheme and Common Lisp, richer than the former and not at all crufty or impossibly massive like the latter. The community is very functional, so to speak ^_^. There's one Google Group where most of the action happens, it's very friendly and helpful and nasty people are not tolerated on it.
- morphir 17y agoMany good points here. Rich Hickey has made a lot of good choices in designing the language and its core libraries; it "feels" like a good fusion of Scheme and Common Lisp, richer than the former and not at all crufty or impossibly massive like the latter. Could you give some language design examples that differs clojure from other lisps? I heard someone speak about 'data' is separated from 'code' in clojure.. any examples of this?