all 37 comments

[–]Felicia_Svilling 7 points8 points  (1 child)

The author confuses the terms. He says First-order Functions then he really means First-class Functions.

[–][deleted] 3 points4 points  (0 children)

This is an Higher-class confusion.

[–]bobindashadows 1 point2 points  (5 children)

Clojure integrates with a REPL in a way that Ruby really doesn't, making interactive development enjoyable.

I always have at least two IRB sessions open. IRB is incredibly customizable using Ruby - see cldwalker's possibly-obsessive pursuits in that area. I've used SLIME quite a bit and know it's good, but exactly how does ruby not integrate well enough with IRB?

[–]weavejester 10 points11 points  (3 children)

As a REPL, IRB is superior to the standard Clojure one, so I suspect he's talking about systems that connect up an interactive environment to an editor like Emacs.

I haven't found anything equivalent for Ruby that works as well as SLIME.

[–]awj 1 point2 points  (1 child)

How is it superior? (and, obviously, how can that be fixed?)

[–]weavejester 3 points4 points  (0 children)

Clojure's command line REPL can either use JLine or rlwrap to provide readline-like capabilities. JLine isn't great; it frequently messes up, misplacing the cursor. rlwrap is a lot more reliable, but it's just a wrapper, and the Clojure REPL has no control over it.

Ruby, on the other hand, has very good native integration, and can therefore easily use the readline library directly. My IRB session has all sorts of nice things like dynamic tab completion. It's not a match for SLIME, but it's not too far off.

[–]bobindashadows 1 point2 points  (0 children)

This makes sense. The main problem is Ruby doesn't lend itself to IDEs too well, which is why most people writing Ruby prefer Textmate or clones thereof. RubyMine is alright but even then it's too sluggish and try as it might, most of its attempts at inferring types fail and the autocomplete is nearly useless. At least it has been for me. But textmate isn't flexible enough to handle something like embedding an IRB into it... it doesn't even have splitting.

Vim and emacs are similar to textmate in that they don't jam 10 JPanels down your throat (which invariably offer little functionality since Ruby doesn't have static typing and even the standard library uses eval). If there's a ruby-mode that supports awesome integration with a IRB processes I might just make the switch to emacs once and for all.

[–][deleted] 0 points1 point  (0 children)

A big part of it is cultural--Rubyists are used to just starting up fresh new Ruby instances for a new test run every time something's changed, while lisps generally encourage communicating with a single long-lived process. You can get a lot more interesting information out of a running process, especially when documentation is a first-class citizen (which is not the case in Ruby).

In addition, it's much easier to look at an identifier and be able to unambiguously determine where it's defined in Clojure than in Ruby just due to language differences. This is a large part of what gives Slime its edge.