Live data from Hacker News

Why does Haskell, in your opinion, suck?

reddit.com

81–90 of 208 posts

Re: Why does Haskell, in your opinion, suck?

#81

Earlier quoted context omitted.

So, binary search? Why did a new name come up for this well known thing in CS?

Binary search sounds kind of 2D. Wolf fence also lets you work with unsorted data. I.e. if I asked you to find a squeaky noise coming from somewhere in your house. Does it make sense to "binary search" your 3D 3-story house? Wolf fencing makes more sense.. stand on floor 2, see if it is on your floor. Or is it coming from the stairwell to floor 3, or the starwell to floor 1? You just used 1 step to narrow your search…

There's this thing called a BSP tree which just uses a plane instead of a line as in the case above. There ya go, binary search.

Re: Why does Haskell, in your opinion, suck?

#82

Mine is that it's built on a lie. A nobel lie, but a lie none the less. In order to be pure it has "stop the world and record it" with monads to do any IO. It pretends that the world can be snapped shotted and immutable. In reality the monad is only an extra box with a belief that the world stops. The world in fact does not.

The IO monad doesn't involve actually recording anything...it's not like MVCC. What are you actually trying to say here?

Re: Why does Haskell, in your opinion, suck?

#83
post #3

Most of these apply to other languages as well: "Haskell sucks because compilation takes too long." "Aye. And it takes too much memory too." "My major gripe with haskell was that I could never tell the space/time complexity of the my code without serious analysis (that among other things involves second-guessing the compiler's ability to optimize). This makes writing good quality code harder than it needs to be." "De…

"My major gripe with haskell was that I could never tell the space/time complexity of the my code without serious analysis (that among other things involves second-guessing the compiler's ability to optimize). This makes writing good quality code harder than it needs to be."

It seems to me that there is some connection/analogy with garbage collection. Garbage collection also makes reasoning about space usage of programs difficult, since it happens in some future, yet unspecified, time. Yet GC is almost always regarded as good (although historically there was a lot of fight against it), yet lazy evaluation is regarded as bad by many. Maybe the issue really is "good enough compilers"?

Re: Why does Haskell, in your opinion, suck?

#84
I had chance to debug one tool built using Haskell. I was amazed how Haskell solution for clean and easy to understand (it was a parsing library generating better optimized SQL queries).

The main problems are:

- it is hard to find examples/snippets of real-world solutions on net (majority of examples are like Hello world and these examples are not useful)

- lack of documentation about building real-world solutions

Maybe more work should be done in explaining how Haskell can be used to solve some real-world problems. Parsing seems like place where Haskell shines and more examples should be available.

So maybe just focus on "parsing with Haskell" and win that space.

Re: Why does Haskell, in your opinion, suck?

#85

Earlier quoted context omitted.

For those who, like me, wondered what wolf-fencing is: "Wolf fence" algorithm: Edward Gauss described this simple but very useful and now famous algorithm in a 1982 article for communications of the ACM as follows: "There's one wolf in Alaska; how do you find it? First build a fence down the middle of the state, wait for the wolf to howl, determine which side of the fence it is on. Repeat process on that side only, u…

So, binary search? Why did a new name come up for this well known thing in CS?

I think it's called "divide and conquer".

Re: Why does Haskell, in your opinion, suck?

#86
post #61

Earlier quoted context omitted.

Good point. (eq (+ 1 2) 3) would read "is add one to two equal to three?" though.

"Are the sum of one and two equal to three" is how you'd read that.

Equal would come first for lisp.

"Would you consider equal the sum of 1 and 2 to 3?"

Re: Why does Haskell, in your opinion, suck?

#88
post #27

Earlier quoted context omitted.

My perspective on this is that lazy be default made sticking to purity much more compelling as if you just dropped print statements in you weren't sure exactly when they get evaluated. This lead to important developments like IO (they started with user input just being a lazy list! Very possible to accidentally block trying to read too much), which might not have happened otherwise. But now, I do feel like lazy is be…

"My perspective on this is that lazy be default made sticking to purity much more compelling as if you just dropped print statements in you weren't sure exactly when they get evaluated." And that's basically a death sentence to the feature because it reduces it to a silver lining of desperate post-mortem optimism. As far as my understanding goes, lazy evaluation was originally included in the language because it was…

> My main gripe with lazy evaluation is that it's implicit behavior. It's to evaluation what garbage collection is to memory

Are you saying you would like to return to the languages with explicit memory management? Or why is, generally speaking, GC considered good and LE considered bad?

Re: Why does Haskell, in your opinion, suck?

#89

Haskell sucks because you can't really get anywhere before understanding monads well, and monads are (take your pick) a) too hard for most programmers, or b) too distant from the abstractions used in most programming languages. Not that's you're done mastering Haskell when you've figured out monads, of course. There are plenty of harder abstractions running around. But monads are the orgo of Haskell, the place many e…

Most people writing Haskell code for real problems should never write their own instances of Monad. When you see someone implementing tons of instances of Monad, it's a sign of over-engineering and Haskell masturbation. Very, very few people are good enough to judiciously understand when and where to write their own instances.

In the majority of cases you should merely be using instances of Monad which solve extremely common problems, like Maybe, List, State, Reader, Writer, and sometimes "functions of a common argument" `((->) r)`. The function one is perhaps the trickiest to understand.

For these examples of Monad, it's really not much work to learn how to apply them. Even just reading LYAH gets you pretty far. You could almost just pretend it is a DSL for composing units of work in each of the classic problems that motivate them (e.g. passing stateful computing, doing non-deterministic computation on a list, etc.).

But I do agree this becomes a huge problem when you join a team and they've architected skyscrapers of customized Monads to do routine stuff. That's a very poor way to build systems in Haskell unless you can guarantee every person on the team is a Haskell expert (hint: you can't).

Your comment strikes me more as a downside of the oneupsmanship of the Haskell community than a problem with Haskell itself.

Re: Why does Haskell, in your opinion, suck?

#90
post #61

Earlier quoted context omitted.

"Are the sum of one and two equal to three" is how you'd read that.

Equal would come first for lisp. "Would you consider equal the sum of 1 and 2 to 3?"

Lisp is read from the middle. (+ 1 2) sort of comes first since it's evaluated first.

Though now that I type that out, I'm acutely aware of how strange it sounds. Interesting.

It's also not true in the case of macros, e.g. let. So, you're right. No wonder it seems so foreign.

Post reply on HN