5 ms·
Well, the same happened to LISP languages. They never seem to get a lot of traction... until Clojure appeared.
by dysoco 14y ago
Well, the same happened to LISP languages.
They never seem to get a lot of traction... until Clojure appeared.
- jerf 14y agoI think that's part of what PommeDeTerre is asking; is there any oxygen left over for a JVM Scheme variant in a world with Scala and Clojure? (And an already-existing line of other languages trailing behind them.) If this were just some other open source project, I'd say go nuts, but we've got a guy here who presumably could get a very good job volunteering to live on raman for 4-6 months to do this thing, so I think this question needs to be considered, even if the answer is ultimately "yes".
- deltasquared 14y agoThe reason you don't see many implementations of Scheme is that Java's calling conventions do not jive well with tail call optimization. This is the same reason that Clojure has the recur keyword: http://clojure.org/special_forms#Special http://clojure.org/special_forms#Special Forms--(recur exprs*)
- amalter 14y agoSee also Scala's compiler, which detects and re-writes tail calls as stackless iterations (http://oldfashionedsoftware.com/2008/09/27/tail-recursion-basics-in-scala/ http://oldfashionedsoftware.com/2008/09/27/tail-recursion-ba...)
- yarrel 14y agoThe Smalltalk equivalent of Clojure is Ruby.
- endlessvoid94 14y agoCould you elaborate on how you see Ruby as a modern Smalltalk?
- cbsmith 14y agoSeriously? Ruby block syntax is straight up lifted from Smalltalk, not to mention much of the semantics and standard library. Ruby seems like what Smalltalk would be if it was built as a scripting language with file-based structure... and then dragged through the mud of Perl syntax. ;-)
- endlessvoid94 14y agoNo 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 agoAlso I hear that JavaScript thing is catching on...
- nicksergeant 14y agoJavaScript is Lisp now?
- zackzackzack 14y agoIt's pretty damn close. First class functions give javascript great power. Combined with something like sweet.js and underscore, and javascript becomes a language with the functional library of a lisp along with macros. After that, javascript is just lisp with really weird syntax.
- chimeracoder 14y agoNot to be snarky, but that's like saying 'Javascript is just a Lisp except without the only characteristic that defines a Lisp'. All the dialects of Lisp differ except in their homoiconicity, which is the one thing that gives Lisps their incredible expressive power. I get frustrated when I hear people refer to languages with first-class functions as Lisp-like, because lots of languages have first-class functions, but that doesn't give them the power of Lisp - Lisp draws its power from homoiconic structure, which almost no other languages have (certainly not Javascript).
- zackzackzack 14y agoMost of my comment comes from the fact that Eich originally wanted to build a homoiconic lisp for netscape and built many of the features into javascript instead. Still no a lisp ,but it was designed to be similar. http://www.2ality.com/2011/03/javascript-how-it-all-began.html http://www.2ality.com/2011/03/javascript-how-it-all-began.ht...
- bgarbiak 14y agoCrockford called it "Lisp in C's Clothing" and then created this: http://www.crockford.com/javascript/little.html http://www.crockford.com/javascript/little.html
- reinhardt 14y agoWondering when the "Clojure has a big traction" meme will die already, or at least be qualified with "in HN discussions". I give it a year.