4

When we look at the the overlap between the Ruby Community - we see the following overlaps:

Is there some linguistic similarity that has lead to this crossover?

4

In a way, Ruby is a "stealth lisp." It allows (and encourages) more metaprogramming than most other languages of its class, even the directly comparable Python. I am thinking here of the famous post, Ruby is an Acceptable Lisp. There are limitations, however; functions are not really first-class objects (calling a lambda or a Proc is horrific, for example), you can't truly redefine the language as you can with macros, and so on.

It makes sense that people who are attracted to Ruby, which has until this point been the most practical and popular language that encouraged a lot of metaprogramming, would be attracted to a language which has better libraries (via the JVM), runs faster than Ruby, is truly functional, is dynamically typed, and encourages metaprogramming to an even greater degree than Ruby. I would hypothesize that you'll also see a greater crossover from the Python and Haskell communities to Scala.

  • This is quite similar to the answer on Quora. – hawkeye Dec 15 '13 at 23:12
1

Here are my two cents. Both languages target the same market:

  • web applications
  • dynamically typed
  • new and shiny (vs c++, java, c#)

Ruby is not really new and shiny anymore, and that would be one of the explanation for the shift of some companies toward clojure. Except from that, clojure has some advantages:

  • heavy use of immutable data structures
  • clean & modern lisp syntax

Although clojure is fairly new, some tools like lighttable/emacs have enough momentum to create a good enough working environment. Clojure is also relatively easy to learn (compared to haskell).

So I would say that some people are attracted to clojure because it's new and they want to explore the functional paradigm.

1

Ruby projects in general appear to scale toward the JVM. Both Twitter and Tumblr began as Ruby projects but now make extensive use of Scala. The JVM gives you access to powerful new tools like Hadoop and the various distributed databases and search utilities.

Ruby tends to find the most use on Macs and Linux-based systems. Thus you want an option that scales to those systems' strengths. You say Mono? Mono could work but is still fundamentally an immature ecosystem compared to the JVM. Particularly regarding language support outside C#

So why then Clojure? Clojure helps smooth some of the problems that large distributed projects face. Functional languages tend to scale better with large sets of concurrent data than Object Oriented languages do. It's also easier to move from Ruby to a Lisp than it is to move to Scala which is more like an ML (SML, OCaml, Haskell, etc). You could use JRuby but again, it's still going to suffer some of the limitations of a pure OO language.

Lastly, Ruby is mostly popular as a web language because of Rails. Yes, there are other options but Rails is the overwhelming majority in terms of deployment. Using Clojure gives you access to all manner of mature web solutions, being designed to function in that environment from the get go rather than adopted into that role 10 years after initial release.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.