5 ms·
For someone who doesn't have enough hours in the day to receive "proper Scheme training" and already (sort of) knows Clojure could you go into detail about what
by SCdF 13y ago
For someone who doesn't have enough hours in the day to receive "proper Scheme training" and already (sort of) knows Clojure could you go into detail about what you mean when you talk about it being "messed up due to kitchen sink syndrome."?
- coolsunglasses 13y agoHe didn't watch any of Rich Hickey's talks and thinks things like protocols multimethods are somehow kitchen-sink. OP clearly hasn't hacked on any Common Lisp written by a CLOS-maniac. Schemers break out in hives if they couldn't implement their own language on a raspberry pi in a single drunken bender.
- dschiptsov 13y agoGladly. 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.