News for hackers. Stuff that matters.
Re:The 2011 State of Clojure Survey is Open by swannodette on Wednesday June 15, 2011 @09:44PM (#2659799)
I use Ruby at work, I like Ruby and I like its metaprogramming facilities. However Ruby's features just doesn't cut the mustard when you want to build something like this, https://github.com/clojure/core.logic. I'm also working on implementing a fast state-of-the-art pattern matcher a la OCaml, https://github.com/swannodette/match.

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.

Re:The 2011 State of Clojure Survey is Open by jonnytran on Wednesday June 15, 2011 @10:37PM (#2659916)
Fair enough. But if you want to start citing examples, I could say the same about Clojure. As far as I know, without JVM changes there's no way in Clojure to implement conditions and restarts in a way that allows you to handle thrown exceptions from code that doesn't know about conditions. OTOH this is just a library in Ruby. https://github.com/quix/cond

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.]

Re:The 2011 State of Clojure Survey is Open by weavejester on Thursday June 16, 2011 @08:32AM (#2660956)
Cond looks a lot like the Clojure error-kit library:

    (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.
Re:The 2011 State of Clojure Survey is Open by swannodette on Thursday June 16, 2011 @12:55AM (#2660149)
Uh, the same way that Ruby can't really help with C errors and C can't deal w/ Ruby errors, right?