Clojure and Haskell both include STM systems for controlled access to
shared resources. There's a Haskell distribution known as Glasgow
Distributed Haskell (GdH), which provides facilities for small-scale
distributed programming. Clojure can achieve the same effect through
the use of third-party libraries (JMS, JGroups, Terracotta, etc...).

I started learning Haskell before coming to Clojure, and from my
experience, Clojure has a much lower barrier to entry. Haskell is an
extremely dense language with a good number of syntax rules and
rigorous type system. Clojure, being a lisp, is very easy to grok
syntactically and easier to learn IMO. Haskell has been around for
almost 20 years. The compiler is extremely advanced, and programs have
a reputation for blinding speed. Clojure runs on the JVM, so you get
the benefit of your programs running almost everywhere without any
fancy deployments and get all the standard libraries that Java
includes.

I spent a few months learning Erlang last year, and I have to say that
it's almost like it's own operating system. It's extremely good at
what it does, but it's use cases are targeted towards the development
of distributed network applications with a high level of fault
tolerance. If you're writing a server using a custom protocol and need
to spread it across multiple nodes and use supervisor trees to
guarantee availability, Erlang is for you. In order to quickly
schedule thousands of micro-threads, it makes some sacrifices at the
scheduler level. This means that things like I/O are going to be less
performant than with other languages.

Comparing the three languages, I'd look at them as follows.

1) Haskell - mathematics oriented, high performance, high learning
curve
2) Clojure - general purpose lisp, JVM, concurrency oriented
3) Erlang - network oriented, high availability, distributed

They're all worth learning. Which is best suited really depends on
what you're trying to do. I'd suggest the following resources.

Haskell - "Real World Haskell" (available for free online)
Clojure - "Programming Clojure" (available through the pragmatic
programmers)
Erlang - "Programming Erlang" (also available through the pragmatic
programmers)

-Travis

On Sep 24, 10:24 am, mmwaikar <mmwai...@gmail.com> wrote:
> With respect to Stuart's comment above - "Erlang is designed for
> distributed operation across many machines; Clojure is designed for a
> single machine with many cores.", how are Clojure and Haskell
> different? I am just curious to know how do Haskell, Clojure and
> Erlang compare.
>
> On Sep 24, 4:36 am, Lance Carlson <lancecarl...@gmail.com> wrote:
>
> > I'd recommend an architecture where you utilize ejabberd and create
> > bots/components that read XML stanzas and react. That way you can just
> > scale your application servers separately and use any language you
> > choose. You also get chat for free.
>
> > On Thu, Sep 24, 2009 at 4:23 AM, ngocdaothanh <ngocdaoth...@gmail.com> 
> > wrote:
>
> > > I think there are 2 kinds of concurrency: local concurrency (one
> > > machine) and distributed concurrency (parallel).
>
> > > Is there a comparison about the speed of local concurrency of Clojure
> > > and Erlang?
>
> > > I would like to create an online multiplayer game server which serves
> > > thousands of persistent flash connections. On a single machine
> > > (something like Intel i7 with 6GB RAM), can JBoss Netty + Clojure beat
> > > gen_tcp + Erlang?
>
> > > Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to