[Haskell-cafe] In-place modification

Sebastian Sylvan sebastian.sylvan at gmail.com
Mon Jul 16 06:53:36 EDT 2007


On 16/07/07, Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:
> Hello Sebastian,
>
> Sunday, July 15, 2007, 9:05:14 PM, you wrote:
>
> > As we've demonstrated there's nothing stopping you from writing
> > imperative "C-like" algorithms in Haskell (just like C#), and there
> > certainly wasn't any major performance difference
>
> as Donald mentioned, this test is just limited by cache speed, not by
> speed of code generated.

But wouldn't you say that in general, if you spend the effort you can
write low-level imperative algorithms in Haskell that perform
reasonably well? Especially compared to e.g. C#? I think your own
libraries demonstrate this!

I'm not saying it's as convenient (see the recent thread about "monad
splices") to write low-level imperative code in Haskell, but using
laziness in C# was hardly a walk on the beach either!
So my point is that Haskell isn't geared towards low-level
optimizations and performance, but in the few places where you do need
it, you *can* get it (IMO for only moderately more inconvenience than
you pay for *everything* in a low-level imperative language). Whereas
C# is a bit the other way around (easy to modify state, inconvenient
to write high-level/lazy/concurrent/etc. code), though something like
C is even more the other way around.

-- 
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862


More information about the Haskell-Cafe mailing list