Live data from Hacker News

Haskell vs. Clojure (2014)

gist.github.com

1–10 of 55 posts

Re: Haskell vs. Clojure (2014)

#2
Clojure is beautiful and elegant. If not for it's lack of popularity and necessity of keeping up with JS constantly, it would be my most used language especially on side projects.

Clojure is one of my favorite languages. If they get the stack traces/better errors figured out, it will be damn near perfect IMO.

Re: Haskell vs. Clojure (2014)

#3
The Clojure code is shorter, but that's almost entirely because it's dynamically typed. And that's not necessarily a benefit, either. Cheshire just takes JSON and turns it into plain old Clojure data (maps, vectors, strings or keywords, etc.) whereas Aeson requires the programmer to manually unroll the whole structure from top to bottom into user-defined types. But by doing so it guarantees that if something is missing or unexpected, the code fails early and fails fast. Plus the static typing enables compile-time checking of all your code which uses it, rather than how Clojure accesses JSON which is so often stringly-typed because that's easiest/shortest/fastest.

Re: Haskell vs. Clojure (2014)

#4
post #3

The Clojure code is shorter, but that's almost entirely because it's dynamically typed. And that's not necessarily a benefit, either. Cheshire just takes JSON and turns it into plain old Clojure data (maps, vectors, strings or keywords, etc.) whereas Aeson requires the programmer to manually unroll the whole structure from top to bottom into user-defined types. But by doing so it guarantees that if something is missi…

hmm still unsure what the types win me then

Re: Haskell vs. Clojure (2014)

#5
If you just want to get shit done, Clojure is fine (though any other Lisp would arguably be better than Clojure).

If you want to get shit done, and make sure the types are correct, and make sure all side effects are properly managed and accounted for, that's Haskell's niche.

Re: Haskell vs. Clojure (2014)

#6
post #3

The Clojure code is shorter, but that's almost entirely because it's dynamically typed. And that's not necessarily a benefit, either. Cheshire just takes JSON and turns it into plain old Clojure data (maps, vectors, strings or keywords, etc.) whereas Aeson requires the programmer to manually unroll the whole structure from top to bottom into user-defined types. But by doing so it guarantees that if something is missi…

Aeson/Haskell doesn't require decoding json into user-defined data types. It supports the scenario of turning the data into a plain Map (clojure style) as well. The plain Map style is simply a less preferred paradigm in haskell, but its very easy to support this. Getting a map out from your json is a one liner.

Re: Haskell vs. Clojure (2014)

#7
post #5

If you just want to get shit done, Clojure is fine (though any other Lisp would arguably be better than Clojure). If you want to get shit done, and make sure the types are correct, and make sure all side effects are properly managed and accounted for, that's Haskell's niche.

> ... Clojure is fine (though any other Lisp would arguably be better than Clojure).

Care to elaborate why you think any other Lisp is better than Clojure? I would like to hear your arguments.

Re: Haskell vs. Clojure (2014)

#10
post #5

If you just want to get shit done, Clojure is fine (though any other Lisp would arguably be better than Clojure). If you want to get shit done, and make sure the types are correct, and make sure all side effects are properly managed and accounted for, that's Haskell's niche.

Like my sibling commenter, I would like to know what’s wrong with clojure when compared to other LISPs
Post reply on HN