6 ms·
My long term bet is Haskell, but boy do the examples look ugly. And most of Haskell really is ugly. My mind just can't get around type names like "M a p f b c =
by pestaa 13y ago
My long term bet is Haskell, but boy do the examples look ugly. And most of Haskell really is ugly. My mind just can't get around type names like "M a p f b c => (a -> p) -> b -> c -> a" just yet. I know it's not hard to understand, but it is hard to parse and build up context.
Looking forward to having 5+ years of experience in this brilliant language.
- ocharles 13y agoRest assured it doesn't take 5 years to get there :)
- k_bx 13y agoYeah, 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.
- ExpiredLink 13y agoWhy 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.
- asdasf 13y agoLets 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.
- pekk 13y agoPresumably 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.
- nightski 13y agoAesthetics 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.