public
Created

Haskell versus Clojure

  • Download Gist
gistfile1.md
Markdown

Haskell versus Clojure

I'm trying to decide which of these two I want to learn right now. I'll probably end up doing both but can't invest at the moment.

Clojure

Pros:

  • The JVM is a fast, stable platform
  • Ease of web app deployment (Heroku, etc)
  • LISP, macros
  • Good package manager
  • Java libraries available

Cons:

  • Ridiculously long startup time (useless for scripts)
  • Lack of types
  • Less popular on Github

Haskell

Pros:

  • Type system
  • Fast start up (+ runghci)
  • "If it compiles, it does what you want."
  • Longer history
  • More popular on Github

Cons:

  • Compiles to native code which makes it more difficult to deploy Haskell apps on things like Heroku
  • Horrible package manager

Given ClojureScript I don't think it's accurate anymore to say that Clojure is not useful for scripting.

@swannodette Write in Clojure, compile to Javascript and run on node.js? I guess that would work, except you're losing the raw speed of Java. For simple things, this would work fine.

V8 is getting very fast. I recently ran the Alioth benchmark for spectral-norm single-threaded on the JVM. The same code written in ClojureScript running on V8 is within 1.5X :)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.