2 ms·
"Anyway, I would hesitate to call {} and [] an innovation." What made it an "innovation" was the decision to close off access to reader macros from the general
by jimbokun 16y ago
"Anyway, I would hesitate to call {} and [] an innovation."
What made it an "innovation" was the decision to close off access to reader macros from the general public. It sounds like a nice idea to allow people to define the behavior of {}, [], etc. however they like. But the effect is splintering the language even further with fewer reusable idioms.
The Clojure idiom of always using [] for any place you have let-like destructuring makes it easier to quickly visually parse code, for example. The abbreviation for anonymous functions wouldn't be part of the core language if the corresponding reader macro was not claimed by Benevolent Dictator Hickey.
This decision may or may appeal to you, personally, but I think it is one of the things that has quickly allowed Clojure to quickly gain popularity relative to other Lisps.
- sedachv 16y agoI'm not sure anyone programming common lisp would agree with you. There's been no "splintering" of the language due to reader macro usage, and the reader macros that CL already provides are not exactly few. Here's a good post describing the what why and how of CL reader macros: http://www.reddit.com/r/programming/comments/7sfro/response_to_problems_with_lisp/c07a1zl http://www.reddit.com/r/programming/comments/7sfro/response_... I would also hesitate to name any particular language feature of Clojure as having an impact on its popularity. I think it's due more to the current zeitgeist of "Lisp is cool, but I program in something else" and "concurrency concurrency concurrency."
- gruseom 16y agoI think it's clear which Clojure feature was/is critical to its popularity: the JVM and interop with Java. This isn't a language feature, of course, but it is a marketing master stroke: it removes the principal objection to Lisp, gives people a cognitive-dissonance-free way to try it, positions the language nicely (no small deal) and soothes the savage enterprise. This dynamic is nearly entirely one of perception -- one could argue that technically it's a non-solution to a non-problem -- but perception is a life-and-death factor. It doesn't matter more than reality in the long run (if Clojure weren't a good language, people wouldn't keep using it) but it actually does in the short run.
- sedachv 16y agoThe problem with that thesis is it has completely failed for Scheme (there are multiple Scheme implementations for the JVM, some are almost a decade old), and arguably for Common Lisp (ABCL came out at approximately the same time as Clojure, and although it's fairly popular as a Common Lisp implementation, it hasn't lead to major growth in adoption). The reason I think the "it's Lisp but not really a Lisp" is a major factor is the example offered by newLISP. Its biggest thing seems to be "all this macro and lisp-2 and lexical scoping stuff is nonsense, this is not scheme or common lisp, this is a simple language," and despite this paradoxical assertion it has developed a somewhat large user community (a lot larger than Arc's, for example). The JVM is much less of a factor than many people suggest. Another good example in support of this and the "concurrency" thesis is node.js - it's not the first JS web server (by far), and it's not the first NIO-based web server, but it does combine the two at the right time.