News for hackers. Stuff that matters.
Re:What it's like to use Haskell by emillon on Wednesday March 26, 2014 @08:34AM (#7472929)
It indeeds looks a bit magical, like the infamous fibonacci example that uses lazy lists.

I don't think that list comprehensions are very idiomatic in Haskell, one would probably use Data.List.partition instead:

    qsort [] = []
    qsort (p:xs) = low ++ [p] ++ high
        where (low, high) = partition (< p) xs
Re:What it's like to use Haskell by danieldk on Wednesday March 26, 2014 @09:18AM (#7473102)
I think you are missing the recursive calls ;).
Re:What it's like to use Haskell by emillon on Wednesday March 26, 2014 @11:22AM (#7473981)
Indeed!

Hey, who said that static typing caught all bugs ? :)

Re:What it's like to use Haskell by axman6 on Wednesday March 26, 2014 @08:11PM (#7477646)
Sure it does, you just need Quickcheck property based testing:

    forall $ \xs -> sorted (qsort xs :: [Int])
Re:What it's like to use Haskell by wnoise on Wednesday March 26, 2014 @09:06PM (#7477873)
That's not static.
Re:What it's like to use Haskell by dangirsh on Thursday March 27, 2014 @04:24PM (#7483190)
Or typing
Re:What it's like to use Haskell by axman6 on Thursday March 27, 2014 @11:46PM (#7485244)
No, it's not, but Haskell's type system is what allows quickcheck to work as well as it does. The implementations in other languages mostly lack a lot of the power provided by the type system.