It could be presented a bit differently, but the underlying idea seems approachable.
* I'm thinking of monads, in particular; whether they actually are or whether it's just due to the way they've been presented is another question.
Pattern matching is awesome. It makes code immensely more readable.
Also, having masses of Haskell blog posts saying, "No, monads are actually not that hard, here's (an explanation that probably won't actually make all that much sense)." probably doesn't help to dispel the myth that Haskell is hard / impractical / whatever.
sum ys = sum' ys 0
where sum' list total =
case list of
[] -> total
x:xs -> sum' xs (total + x)- algebraic types. haskell has type inference, so it can do the right thing while you only describe the function as operating on lists. now look at java...strong typing but no intelligent inference, which is why you are forced to write retarded java like HashSet<Integer> s = new HashSet<Integer>()
- pattern matching. you can describe functionality based on the pattern of the data
this isn't just syntax. these are really powerful fundamental features of the language
I guess that you don't know that generics in Java were derived from Haskell type classes and designed by the same man who added monads to Haskell.
doSomething :: HashSet Int -> HashSet IntIt's true that you can omit most of the type signatures and let the compiler figure it out but nobody really writes Haskell code that way if they want it to be comprehensible by human readers.