Erlang or Haskell or Ocaml?

erlang

Okay, I need to do a geek post.  I want to learn functional programming, I have heard lots of good stuff and lots of nasty stuff about it.  But I can't comment on it unless I have tasted it.  There are 3 I am interested in.  I heard lots of good things about Erlang, it's used in many production machines, it seems to have a strong following and it's designed in such a way that you can easily upgrade a system without stopping the program.  Then there is Haskell, it seems like it's made by the super academic for the super academic, it has a steep learning curve and is purely functional, it sounds nasty.  Then there is Ocaml, apparently it's comparable in speed to C/C++, it's a mix of functional and imperative programming and the size of your code is a bit shorter than C++.

Has anybody had any experience with any of these.  I want something that is easy, and fun, to code.  Is fast.  And gives me a good taste of functional programming.  I would also possibly be able to apply it to my work in some places.  Have you seen any of these languages used in the wild, outside of academia?  If so, where have you seen them used?  What are functional program like to maintain?  With this, I am asking what happens when you come back in 6 months to update the code, is it easy to update/refactor/optimise?

Hey its simon!   I was

Hey its simon!

 

I was thinking about you the other day while looking at these:

http://www.skytopia.com/project/fractal/mandelbulb.html#renders

 

I seem to remember you were doing rendering of 3d fractals quite a while back ... is that right? 

Yes, I was working on this a

Yes, I was working on this a while ago.  I optimised some quaterion fractal code.  Code is in C, optimisation was done in assembly using 3dNow! I provided my optimisation back to the creator, but it was never used.  It was fun.  Code ran 4 times faster in the end.  I have to pull this out of the closet again.

Erlang is used here at work,

Erlang is used here at work, there is a messaging gateway written in it, I have had to interface to it using http but thats it.

There is also an erlang users group called erlonge that meet in the room next door to me once a month

http://wellington.geek.nz/group/erlounge-erlang-users-group

Some of the guys from perlmongers attend.

I know Andy had a play with it too, he may have a comment.

So erlang is out there in the real world, not sure about the others..

 

oh xmonad is writen in haskell, i am goignt to get round to switching to it from ion3 rsn.

Cool.  xmonad looks

Cool.  xmonad looks interesting.   Is erlang fast?

I know a Haskell zealot that

I know a Haskell zealot that I am sure would be glad to impart his knowledge. can put u in touch...

okay, what's so good about

okay, what's so good about Haskell? and why is it better than ocaml or erlang?

Haskell supposedly has lots

Haskell supposedly has lots of fancy features, the only one of which I can recall is
Software Transactional Memory. Which is supposedly good for solving threading/concurrency problems. Never used it myself tho.

i think most functional

i think most functional programing lean torwards having a better solution for threading than imperative programming.  i think i may continue with ocaml and then see how i like it.

@simon this book is meant to

@simon this book is meant to be a good place to start.
real world haskell

thanks mike, looks like a

thanks mike, looks like a good read.  i will get started with haskell, but i may end up trying all 3 and see which i like best.  i think half of the language is about liking it, and i like python.  i actually like javascript too, it is actually a really cool language to play with.  here is a cool video to show the good parts:

http://www.youtube.com/watch?v=hQVTIJBZook

http://www.haskell.org/piperm

I wonder wheather you have

I wonder wheather you have come to a decission which of these three languages you'll give a start. I am still undecided between Erlang and Haskell.

The cool feature of Erlang is it's in-built concurrency I immedaitely felt confortable and it's modern, yet only half-way backed web frameworks. The main downside is lack of packaging infrastructure, TCL/TK still used as main UI library and unfortunately a VM which lags behind the trends in speed. Some nice prjects build on Erlang like couchDB, riak or the nitrogen web framework. Everything seems to be in place for cloud computing.

The pros of Haskell clearly is the brutal performance and packaging mechanism (cabal). There is even a decent IDE (Leksah). I have not yet finished all of Haskells syntax, e.g. I have to understand monads first, but until now Haskell seems to have much more line noise than Erlang. What was the biggest surprise to me was the lack of implmentations of recent technologies, like a RESTful API, a document store database, key/value database or an event driven web framework.

I hung out on #erlang and #haskell. There are about 3x more people on haskell but on erlang. But on Haskell they are talking mostly about the language while on Erlang the main topics are about implementation and getting things done.

Okay, I finally took my

Okay, I finally took my finger out.  I'm going for OCaml :).

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Insert Google Map macro.

More information about formatting options