4 ms·
Which is more beautiful, haskell or clojure? This is a subjective question, so I'm hoping to read subjective and highly opinionated answers.
by crimsonalucard 11y ago
Which is more beautiful, haskell or clojure? This is a subjective question, so I'm hoping to read subjective and highly opinionated answers.
- rtpg 11y agowell that first example in the article would be foldl (+) 0 (map (+2) [1..10]) or sum $ map (+2) [1..10] So... make up your own mind. As someone who has written only small chunks of lisp but at many different points in life, I do find the whole parens game to be a bit disorienting, but usually I can counter it by using newlines. I would write something like (reduce + (map (comp inc inc) (range 10))) as (reduce + (map (comp inc inc) (range 10)))
- crimsonalucard 11y agoI deal with it by using an IDE or plugin for paren highlighting.
- zeekay 11y agoRanges are inclusive, so: sum $ map (+2) [0..9] Nitpick, but it confused me for a second.
- hellofunk 11y agoThey are both beautiful in their own way. Haskell is more pure, certainly, and closer to mathematical beauty, definitely. But the extraordinary flexibility of a lisp, which Clojure does immensely well, makes it more powerful than any language I've experienced for quickly expressing or manipulating an idea. Any program written in Clojure could eventually be refactored into another language, but its strength as a dynamic lisp makes it possible to really get to the heart of a problem and work out its solution without anything else getting in the way.
- daxfohl 11y agoHaskell was created to be beautiful. Clojure was created to be practical, with plenty of ugly pragmatism thrown in. If there's an argument over beauty, it should be Haskell vs Lisp (vs Prolog, vs Forth, and probably vs assembly).
- wetmore 11y ago> Haskell was created to be beautiful. Clojure was created to be practical Haskell was created to unify research in programming language theory under a common language, not to be beautiful.