
Ben.Lippmeier:
Sebastian Sylvan wrote:
Haskell is now ranked number 1 on the Great Language Shootout!
That is neat. Mostly for dispelling the "pure lazy fp is inherently slow" argument.
Ha! I don't think "pure lazy fp" would be the phrase I would choose to describe this code.
An example (from fannkuch):
t <- IO $ \s -> case readIntOffAddr# p1# 0# s of (# s, p1 #) -> case readIntOffAddr# p1# (n# -# 1#) s of (# s, pn #) -> (# s, not (p1 ==# 0# || pn ==# (n# -# 1#)) #)
Ok, I'll bite ;) This is a very atypical "example", as fannkuch is the only entry written this way (and it could be rewritten, with careful attention to the Core). There are also many lovely pure, lazy entries. A great thing about pure, lazy Haskell is that you can write impure strict code if you have to. Cheers, Don