Hacker News new | ask | show | jobs
by the_mat 5371 days ago
Please stop with the toy benchmarks and pretty one-liners that show how awesome Haskell is.

There is growing list of smart programmers who get all enchanted with Haskell, jump into it wholeheartedly, and end up frustrated (see bottom of message). GHC makes the typical C++ compiler seem fast. Once code grows past the homework problem size, all hope of understanding memory usage is lost. I don't think people really get how bad that it is. The whole culture of Haskell is based around static checking, yet you have to run a program in order to find out if it blows your memory limit several times over.

Haskell is still a neat language, but we need less advocacy based on toy programs and more honest realism.

(Here's a typical, non-superficial example: http://wagerlabs.com/haskell-vs-erlang-reloaded-0)

2 comments

That post is from 2005. The situation is entirely different today w/respect to speed (both the compiler and the addition of ByteString and Text libraries), and productive libraries, particularly for web development. Likewise, it is a rare case that you would run into memory consumption issues.

I do agree that there is entirely too much enthusiastic toying around in Haskell and not enough real world users and honesty about limitations.

To me, there's a dichotomy between the "if it compiles, it usually works" aspect of Haskell (and how this is often touted as superior to the dynamic typing, test-driven approach) and that you can't get a picture of memory usage until you run and profile the code. In my experience, hard to understand memory consumption issues are common and take effort to solve.

Reference: http://blog.ezyang.com/2011/06/pinpointing-space-leaks-in-bi...

That blog post says nothing about frequency of memory leaks, but shows that there are good tools to help you in your effort to solve them. One thing to keep in mind is that there are memory issues with every language. I just debugged one in Ruby yesterday, and there wasn't a good tool readily available for that effort. Do you know what the memory consumption of your programs are in other languages are before running them?

As a contradictory anecdote, I have never once had a memory consumption issue with Haskell code. Haskell is actually in a nice position w/respect to memory now that enumerators (which always use constant memory) are taking hold. I have no doubt you encountered many memory leaks, but I don't think your experience completely generalises to modern Haskell.

To be fair, as I understand it the toy benchmark was someone else's and he was offering a haskell implementation.