4 ms·
Gladly. Some languages does not emerge all of sudden as a product of one sharp mind (there is no doubts about that) but are time-selected mix of (ideally very f
by dschiptsov 13y ago
Gladly. Some languages does not emerge all of sudden as a product of one sharp mind (there is no doubts about that) but are time-selected mix of (ideally very few) basic concepts and syntactic constructs which form a well-balanced set of features.
The examples of well-chosen set of basics is Scheme R4RS, or pg's Arc. The examples of so-called natural selection are CL (an attempt to put together the best ideas and syntactic sugar from various implementations) and, surprise! Haskell, which is a product of a merge of efforts of ML/Lazy languages world.
On the other hand, there are languages created by one individual, according their own preferences, such as Perl, Ruby and Clojure.
Ruby, for example, it is a mix of features from Perl and Smalltalk, its author liked, but, of course, the resulting language is neither a dialect of Perl or Smalltalk. It is a language of its own.
Similarly, Clojure is a mix of features from various languages, notable Common Lisp, Smalltalk, ML, plus various Python-like comprehensions for vectors or hashmaps.
There are many other clever tricks, like simplified pattern matching, at the cost of sacrificing uniformity and announcing vectors as parameter lists for binding constructs, apparently from ML, and multi-method function declarations, also from ML.
The result is a language of its own, and cannot be called a Lisp, the same way Ruby cannot be called Smalltalk. The design decisions, while mostly clever, broke the uniformity and clarity of classic Lisps.
So, in my opinion, Clojure is closer to Ruby in its ideology, than to Lisp.
- rsamvit 13y agoClojure is most definitely a Lisp. The biggest difference from more traditional lisps is that it has literals for a wider variety of data structure types. Apart from that, it has every single characteristic that defines a lisp. > After proper Scheme training (CS61A) Clojure looks awkward and messy but very useful, as it supposed to be due to its "productivity beats clarity/conciseness" philosophy of scripting languages, such as Ruby. As someone with "proper Scheme training" (CS61A), I've found that Clojure is actually much more clear than Scheme in most cases. The code is less beautiful from a purely visual perspective because there is more syntax, but a lot of complexity gets removed when you add literals for sets, vectors, and maps.
- hga 13y agoWell, I don't think it can be called a LISP, as in LISt Processing, which I pedantically use to describe the Lisps that came before it, because in addition to making those additional data structures first class syntactic citizens and their widespread use by programmers, it as dschiptsov notes modified some standard LISP syntax to use vectors where you have a list that'll never be modified, extended, etc. E.g. (defn name [arg1 arg2] body). Lists are not the alpha and omega like they are in LISPs. But I agree it has "every single characteristic that defines a lisp", even if it looks funny to experienced Lispers like myself. Aesthetically I much prefer standard LISP syntax + indentation , but 100% support the use of literals for the non-list data structures. Many disagree on the syntax, and if no longer having a sea of pure parens brings more adaptation I'm willing to live with it. I got the impression the syntax changes were due to that reason vs. inspiration from ML, but I'm not at all sure about that. Still, Rich Hickey is an experienced Lisper with exquisite taste below the level of syntax, so I'm pretty sure he was aware of the implications of his syntax changes.
- jared314 13y agoI don't understand your position on lists. In Clojure, lists, vectors, and other collections are unified under the Seq abstraction. To me, they are all the same, until I need some specific behavior or performance characteristic.
- hga 13y agoIt's aesthetic, how the code looks (e.g. in an editor), and can't be separated from a quarter century of LISP experience (Lisps where only lists/pairs are syntactically first class). Note data in code is an exception, it's perfectly fine to e.g. include literals of other collections. Don't take me wrong, making the other collections syntactically first class and unifying them under the Seq abstraction is a really good thing, in fact when I appreciated that it was the first thing that got me really excited about Clojure, especially Clojure as "the next Lisp". But personally, if just for myself, I would have kept the vectors out of the syntax and depended on indentation in smart editors.
- regularfry 13y agoI've said it before, I'll say it again. Your definition of "Lisp" excludes Common Lisp. Precisely the same criticism of "kitchen-sink syndrome" was levelled at CL back in the day. I don't see how a definition of "Lisp" that excludes Common Lisp is useful. How do you find this definition useful? You bring it up with remarkable regularity when Clojure is mentioned, presumably you find some value in it?
- marshray 13y agoLisp was the discovery of a set of a few simple concepts so elegant they give us a transcendental way of thinking about programs. But then people built religions around their own embodiments of the concepts. Eventually the infighting started and it is still driving most folks away. Occasionally, a pragmatist like Hickey comes along and says "hey look how useful this can be". Another generation of programmers takes a look at Lisp. Where will it go this time?Can Lisp be saved from the Lispers?