News for hackers. Stuff that matters.
Re:What I Wish I Knew When Learning Haskell 2.0 by chongli on Wednesday April 23, 2014 @11:16PM (#7638325)
Of course you can tweak things to be fast in hakell, but to be able to actually program haskell in such a way to, beat other languages in performance, is not a trivial skill.

It actually is trivial in a lot of cases. It's often as simple as swapping out lists for vectors and inserting a few strictness annotations into your types.

Re:What I Wish I Knew When Learning Haskell 2.0 by danieldk on Thursday April 24, 2014 @03:39AM (#7638913)
...and using the ST monad. In the end it pretty much ends up looking like an imperative program.

The good news is that it stops at the function boundaries. Your quicksort may be implemented in the ST monad, looking like some bastard child of C, but the function type ends up being

  qsort :: Ord a => Vector a -> Vector a
And that's one of the likeable properties of Haskell: it doesn't deny that real-world programs sometimes require mutability, but allow you to isolate it through the type system. So, even though qsort may use mutable memory for sorting, it is a pure and referentially transparent function.