The 2011 State of Clojure Survey is Open
cemerick.com
cemerick.com
One problem that Clojure really does have is that there are other fun/good languages available. Seriously, with Common Lisp, (J)Ruby, Scala, Python, and even Java, there is a lot of competition for developers' mindshare.
For me, the bottom line is that designing and writing software is hard work, and I want to use languages that I am happy using. I started programming in the mid-1960s (I was just a kid, I am not that old :-) and I keep doing it because I really enjoy it. Pick languages that make you happy.
- Future staffing concerns
This can be killer for a startup.
Although I do very much enjoy clojure and its not any easier to find ruby hackers these days since the demand is so high.
I don't need concurrent code. I let the Web server and database handle that.
edit: Clojure is one of those groupthink subjects on HN. Say anything negative about it and you're destined to get downvoted. I admire Rich Hickey. I read Stuart's book. I wrote some code in Clojure and I came to a conclusion: for me it was a waste of time. I heart Ruby and Nginx and databases that handle state for me. I guess that opinion isn't valued around these parts.
EDIT: though I don't agree with your viewpoint (why limit state management to your db and webserver, don't you want the same guarantees for your app logic as well?), I did not downvote you.
Clojure is a wonderful way of managing state in a _single JVM_. I think it has totally cracked this problem, and its model is the model I want to see everywhere for managing concurrency in a single process.
My problem is that I feel it's solving a problem I don't really have. I'm not making desktop software, so I just don't care about using a single machine's cores safely and efficiently. While you claim most software could benefit from managed state, my assumption is that the majority of people looking at Clojure today are thinking of it for server software. The issues there immediately spread beyond a single process, and suddenly all the magic of Clojure stops being relevant. To scale my app I'm using multiple processes across multiple machines, and while I'd love something similar to the Clojure model to apply there, it just doesn't.
I feel like Clojure has popped up at an unfortunate time when desktop apps are only just thinking seriously about concurrency, but server apps have already moved beyond the model that works within a single JVM. So I really don't know what its sweet-spot is.
All that said, I should repeat that I love the language and have found it an exceedingly productive way to work on the JVM. I just wish it solved even bigger, cleverer problems than it already does. ;)
What is it you said that I didn't?
However, I've since moved on to Ruby and learned a lot about its metaprogramming features. This is purely my opinion, but I get the impression that a lot of people who are smart enough to get Lisp, functional programming, and metaprogramming dismiss Ruby as being yet another OO language too soon, before getting to know it. On the contrary, I've found that the more I learn about Ruby, the more it grows on me, and the more similarities I see it has with Lisp.
I guess what I'm saying is, the reason I use Ruby is kind of like the reason I use a Mac, or why I tend to use languages with dynamic typing. There's no one killer feature that I can point to over the competition. In fact, there are a number of features that are hands-down superior in the other. I haven't quite figured out how to explain it to people coming from the other side, but for me, Ruby just hits the sweet-spot on so many levels. People talk about Macs being usable and even loved by grammas who know nothing about computers and hackers at the same time, audiences on complete opposite ends of the spectrum. Ruby is similar. On the one extreme, it's approachable to complete newbs. I know designers who would turn their nose up at the sight of code but were willing to learn the basics of Ruby to implement their designs. On the opposite extreme, it supports first-class continuations out of the box, which isn't even part of the Common Lisp standard. Also, a lot of times when I would've needed a macro in Lisp, I simply didn't in Ruby. And that's hard to explain... Sure I can do things with macros in Lisp that I can't in Ruby, but all other things being equal, wouldn't you choose the non-macro way over the macro way? (Sigh... I hear the flames starting.)
I'm not sure I agree with you about state, but it's true that with a web server and db, I've so rarely ever needed more concurrency features. Maybe this means Clojure is just not meant for people like me writing mostly web apps. But to play devil's advocate, maybe it's a good thing to let a piece of software designed specifically for handling concurrency -- handle the concurrency. Namely, a web server or database. This actually forces me in a good way to design my app up front to do any heavy processing asynchronously outside of a web request, which often means a queue, which often implies work divided into small pieces run concurrently by workers (separate processes, possibly on remote hardware, not just using an agent in another thread or relying on shared memory) which may die at any time without significant effect (a la Erlang). ...Again, maybe I'm just not in Clojure's target audience.
These aren't small metaprogramming things - these are considerable useful language features reachable in Clojure that are not reachable with acceptable performance in the current crop of mainstream dynamic programming languages.
I don't want to get academic/knit-picky. I guess my point is even though living on the JVM definitely has some big advantages, it also has some drawbacks.
I'm not trying to knock Clojure. I think it's great. But this thread is about why you're not using it. So I'm just speaking to that.
[Edited to talk less about Ruby and more about Clojure.]
(deferror divide-by-zero
{:msg "Division by zero})
(defn divide [x y]
(if (zero? y)
(raise divide-by-zero)
(/ x y)))
(with-handler
(divide 10 2)
(divide 18 3)
(divide 4 0)
(divide 7 0)
(handle divide-by-zero
(continue-with 42)))
Admittedly this doesn't violate your general point; there are things like continuations that are hard to do with Clojure due to limitations the JVM. However, I tend to find there aren't many things Clojure can't do, and in general it seems more flexible and better designed than Ruby.Off topic, I've noticed that comments on HN are being downvoted a lot more often than they were, even when those comments are entirely legitimate. It's getting to be somewhat problematic.