Haskell is a purely functional programming language developed in the late 1980s. Also, it's apparently a horse race.
The language takes its name from logician Haskell Curry, a really smart guy who has the interesting honor of having things named after him with both his first and last name - Haskell, a language called Curry (which was based on Haskell), the concept of currying, and Curry's paradox. His doctoral adviser was David Hilbert, another really smart guy who wanted to prove that mathematics was both complete and consistent. (Kurt Godel proved that it wasn't, thus probably making Hilbert's head explode, but that's not really relevant.)
A functional programming language treats functions as data. It's very easy to pass them as parameters to other functions and get them back as values of other functions.
A purely functional language is a functional language in which functions have no side effects. Calling the same function with the same parameters is guaranteed to always produce the same result. (This makes random numbers tricky. It's possible, but you have to cheat a bit.)
And, finally, a Hello, World program. (At least theoretically; I'm still wrestling with the compiler.)
UPDATE: The compiler has surrendered; victory is mine!
main = putStrLn "hello, world"
Yep. That's it.
It's a good idea to install GHC from the Haskell Platform, as then you can be sure you have all the regular libraries, as well as the 'cabal-install' tool, meaning you can install from the 1600+ libraries on http://hackage.haskell.org
ReplyDelete