[Haskell-cafe] Re: OCaml list sees abysmal Language Shootout results

Andre Pang ozone at algorithm.com.au
Fri Oct 8 18:05:46 EDT 2004

On 07/10/2004, at 11:51 AM, Peter Simons wrote:

> The problem is not Haskell, nor is it the implementation.
> The problem is that beginners, including yours truly, tend
> to write awfully inefficient code once you give them a
> "String" and tell them: Here, that's the contents of your
> file. The lazy API hides the fact that I/O takes place, and
> it is very tempting to forget that you shouldn't use it like
> a random access list. The lazy API "encourages" you to write
> inefficient code.
> Nonetheless, the problem is the inefficient code, not the
> language.

If the language encourages you to write inefficient code (or rather, 
discourages you from writing efficient code), I see that as a problem 
with the language.  You mention the use of hGetBufNonBlocking to get 
better performance: would you like to rewrite all your code to use 
hGetBufNonBlocking rather than using e.g. stream-based lazy lists?

% Andre Pang : trust.in.love.to.save

More information about the Haskell-Cafe mailing list