4 ms·
Well written article, but it would be more relevant, IMHO if it compared Haskell and Clojure, not CL.
by critic 18y ago
Well written article, but it would be more relevant, IMHO if it compared Haskell and Clojure, not CL.
- newt0311 18y agoNot really, the criticism apply in both cases. The main area where clojure wins against CL is that clojure is not bloated and that wasn't where the author of the article had major problems. Also, to his additions, I would like to add in the lack of decent data-structures in lisp. Cons cells are nice but they are no match for algebraic data-types and pattern matching.
- j2d2 18y agoYou must be new here...
- deleted 18y ago[deleted]
- andreyf 18y agoNot really, the criticism apply in both cases. The main area where clojure wins against CL is that clojure is not bloated and that wasn't where the author of the article had major problems. Also, to his additions, I would like to add in the lack of decent data-structures in lisp. Cons cells are nice but they are no match for algebraic data-types and pattern matching.
- jrockway 18y agoCons cells are nice but they are no match for algebraic data-types and pattern matching But of course, with a dynamic type system, objects are basically the same thing. In CL, you can encapsulate data inside its own type, and then match on that type. (It also has super/sub-typing relationships, which Haskell does not.)
- JulianMorrison 18y agoHaskell does have interface inheritance with type classes.
- jrockway 18y agoThis is more like trait composition (1) than inheritance. I don't consider this a downside, though, as I almost always choose trait composition over sub-typing when I am using a more OO-ish language. (1) http://www.iam.unibe.ch/~scg/Research/Traits/ http://www.iam.unibe.ch/~scg/Research/Traits/
- mdemare 18y agoClojure has great support for parallellism, and Clojure's community is very friendly. Haskell has nothing on Clojure in these specific regards.
- dons 18y agoIn support for paralleliism or a friendly community? I'd have thought it has both in truck loads. Well tested, fast parallelism, that's stood up to 15 years of testing...
- jrockway 18y agoWhy do you think this? Haskell not only has a friendly IRC channel, it also has friendly tools for interacting with the community. For example, it is very nice to hear someone talking about Yi, type "cabal install yi", and then having it installed and running in just a few moments. (It is also very nice to pull the xmonad darcs and say "cabal install" to install the newest version of xmonad. I don't even bother with Debian packages for anything related to Haskell anymore.) Anyway, my point is, I think you should try Haskell before you talk about it.
- chancho 18y agoAs a longtime GHC user and sometime #haskell visitor, I find your troll HILARIOUS. One thing though, you forgot "Clojure has a better library of persistent data structures." That would have sent dons into an epic flameout.
- 18y ago
- JulianMorrison 18y agoClojure completely erases the parallelism section as a complaint (although to be fair GHC is the unchallenged fastest parallel gun in the west, but contrary to the article, so far as I know even GHC never just guesses parallelism without being asked). Data structures, you mean like hashmap, vector, list, sequence? Those are all basic in Clojure. You can de-structure them within the parameter list of a function or a let, which is about half of what pattern matching is used for in Haskell. (There are also streams, but those are a bit more fuss, and they're experimental.)
- anamax 18y ago> Data structures, you mean like hashmap, vector, list, sequence? Those are all basic in Clojure. And CL...
- glymor 18y agoYou can use the same car, map on any of them as the functions operate on a sequence interface not on cons lists. Whereas in CL these functions are defined directly on the implementation (cons lists) so map can't map over a vector you need to make a special vector only map and so on.
- anamax 18y ago> Whereas in CL these functions are defined directly on the implementation (cons lists) so map can't map over a vector you need to make a special vector only map and so on. Wrong. The Common Lisp list functions, such as mapcar, are restricted to lists but Commmon Lisp also has sequence functions which take any Common Lisp sequence type. Common Lisp's map happens to be a sequence function. I forget if hashes are a Common lisp sequence type, but vectors definitely are. IIRC, Common Lisp strings are sequences.
- glymor 18y agomapcar in clojure wouldn't be limited to lists even if no one had though about the it at the time - this is the difference. There's a ton of CL code out there that only works on cons lists, adding a sequence type doesn't solve this nor does it force people to use it or change existing code.
- deleted 18y ago[deleted]
- glymor 18y agoClojure's object system: http://clojure.org/runtime_polymorphism http://clojure.org/runtime_polymorphism