Also. I suspect that some people will find learning to program a bit easier with functional programming languages like Haskell. When learning Haskell, I wrote lots of simple functions, and acheived more complex results by stringing together lots of simple functions. In imperative languages, it’s a bit harder to test all the individual pieces as you’re going.
The type system of Haskell is quite restrictive for beginners (it’s a little annoying to not be able to debug by putting a print anywhere, or read user input wherever you want) and the laziness can be a little unintuitive, especially for people who haven’t done much mathematics (e.g. ones = 1:ones… “I’m defining something in terms of itself, aghafghfg”).
But, I do agree that functional languages might be easier to teach to certain groups of people, like those who have done a fair bit of maths, and that Haskell has some very neat features for learning to program (GHCi and Hoogle are awesome!).
The type system of Haskell is quite restrictive for beginners (it’s a little annoying to not be able to debug by putting a print anywhere, or read user input wherever you want) and the laziness can be a little unintuitive, especially for people who haven’t done much mathematics (e.g.
ones = 1:ones
… “I’m defining something in terms of itself, aghafghfg”).But, I do agree that functional languages might be easier to teach to certain groups of people, like those who have done a fair bit of maths, and that Haskell has some very neat features for learning to program (GHCi and Hoogle are awesome!).
There’s unsafePerformIO :: IO a → a
Or, er,
Debug.Trace.trace
…I agree.