4 ms·
No need to be condescending, I was genuinely curious. At first glance, the two languages seem similar, but not as much as Clojure is to CL (or any other lisp).
by endlessvoid94 14y ago
No need to be condescending, I was genuinely curious.
At first glance, the two languages seem similar, but not as much as Clojure is to CL (or any other lisp).
- rubinelli 14y agoIt's hard to detect if a terse question is a request for information or a challenge. Back to the subject, Ruby's OO is much closer to Smalltalk's vision. Method dispatching in Java is essentially dereferencing a function pointer (found by traversing a class hierarchy) and adding a hidden argument (self.) In Ruby, you can override an object's method dispatching mechanism to be whatever you want it to be (although the default behavior is very similar to Java's.) This makes it a lot harder to optimize, (your JIT compiler can't simply inline those calls) but it opens all kinds of interesting meta-programming possibilities.
- spooneybarger 14y agoFor anyone interested in the general topic of implementing a dynamic language on the jvm, Charles Nutter has a ton of good material around invoke dynamic and jruby.
- aidenn0 14y agoAs a CL developer with only a bit of dabbling in Smalltalk and Ruby, Smalltalk and Ruby seem much more similar than CL and Clojure. In particular, Clojure's preference for vectors over lists in many situations, combined with its much stronger preference for immutable objects makes it highly distinct from CL. The requirement for explicit trampolines to allow efficient tail-calls makes it distinct from any (non-toy) lisp I've ever used.
- cbsmith 14y agoSorry, I wasn't intending to be condescending. I thought you were making a joke.