Yeah, but type
foo :: M a p f b c => (a -> p) -> b -> c -> a foo f b c = ...
would look something like
A foo<M<a>,p,f,b,c>(AP f, B b, C c) { ...
in Java (I don't know Java, but I hope you gen an idea). I mean, this is a really complex example you've shown. And most of the times, you can (just like everywhere else) write simple type synonyms to express what you want.
Rest assured it doesn't take 5 years to get there :)
Re:Haskell for Web Developers
by ExpiredLink on Friday July 26, 2013 @12:33PM
(#6109043)
Why do you think a language that "really is ugly" and " is hard to parse" must be a "brilliant language"? Maybe the emperor has no clothes? Maybe Haskell is just what you see: suitable for academic discourse, unusable for real-wold programming.
Presumably he thinks that it is brilliant for reasons he already knows, probably involving the type system, but also observes that it is aesthetically ugly and difficult to read.
Aesthetics are purely subjective and rather useless. Hell even our own opinion of them can change drastically over time. The other reasons are what matter. I initially found Haskell quite ugly. But now that I understand the semantics behind it the syntax is quite beautiful in my eyes.
Lets throw reason and common sense to the wind and pretend the subjective "haskell is ugly" is objectively true. Given that, could you explain to me how you make the seemingly wild and random leap to "haskell is suitable for academic discourse, unsuitable for real-world programming"? Perl is widely considered to be ugly, is it also only suitable for academic discourse? What properties do you believe haskell possesses that makes it unsuitable for "real-world programming"? What do you even deem "real-world programming" to be? It seems rather bizarre to suggest haskell is unsuitable for real-world programming in a discussion about examples of using haskell for real-world programming.
Looking forward to having 5+ years of experience in this brilliant language.