Live data from Hacker News

Why does Haskell, in your opinion, suck?

reddit.com

21–30 of 208 posts

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

#21

Earlier quoted context omitted.

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

Wolf fencing is new to me too. It seems to be used only in the context of debugging. While with git bisect, we are also repeatedly ~halving the remaining search space, the list of commits isn't "sorted" like the precondition for binary search. You could argue that commits are sorted against time. But I would say that's different because we don't know which commit hash we're looking for -- we just want to find the poi…

*> the list of commits isn't "sorted" like the precondition for binary search.

Good point.

One may think that in some sense, it is sorted: The history is sorted into "good" commits (before the bug was introduced), which are followed by "bad" commits (after the bug was introduced).

However, the bisection algorithm also works if "good" and "bad" commits are mixed. Even then it will find one commit where the bug was introduced (although there may be other places where it had been fixed and later reintroduced).

This works because bisection doesn't require a sorted list, it just needs a continuous function. And any sequence is just a special case of that.

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

#22
post #15

Haven't seen it listed neither here nor there, so not sure if I'm the only one, but: for me, the first and currently blocking obstacle is of "graphical" syntax. I'm of the kind of people who hear the words they read as a voice in their head, so when every line is interspersed with multiple "random" >>= -,-'-- and whatnot other ascii-art I can't verbalise, I distictly feel my brain stumble, mumble, and grind to a halt…

Hoogle could help with the searching problem: https://www.haskell.org/hoogle/

Nice to know. Still, no spelling there, as far I can see. And no docs or examples either, apparently: https://www.haskell.org/hoogle/?hoogle=%3E%3E%3D is still a problem for me

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

#23
post #22

Earlier quoted context omitted.

Hoogle could help with the searching problem: https://www.haskell.org/hoogle/

Nice to know. Still, no spelling there, as far I can see. And no docs or examples either, apparently: https://www.haskell.org/hoogle/?hoogle=%3E%3E%3D is still a problem for me

One additional click on any of the links (usually the function name) brings you to the actual documentation.

https://hackage.haskell.org/package/base-4.8.2.0/docs/Prelud...

Edit: Granted ">>=" (bind is the word you are after) is kind of special and you need to understand more of the underlying language mechanics to get it. The provided explanation tells you little unless you can grok the function signature. I think it's almost universally accepted that a lot of the documentation is atrocious.

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

#24

I just prefer to use languages without a Garbage Collector.

Any experience doing functional programming without garbage collector?

I'm doing a lot of Clojure, and can't really see how it would be a pleasant experience without GC but curious to hear any interesting thoughts.

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

#25
post #15

Haven't seen it listed neither here nor there, so not sure if I'm the only one, but: for me, the first and currently blocking obstacle is of "graphical" syntax. I'm of the kind of people who hear the words they read as a voice in their head, so when every line is interspersed with multiple "random" >>= -,-'-- and whatnot other ascii-art I can't verbalise, I distictly feel my brain stumble, mumble, and grind to a halt…

I felt the same way (and still do in general, with notable exceptions). I.e. to put this first: I think a lot of the Haskell community is obsessed with mathematical "cuteness", which basically they take to mean "infix-operator-heavy" notation.

Nevertheless, I have learned to like some operators,

     , *>, 
are ones that come to my mind. The operator

    
is basically fmap as infix notation, so `fmap f [1,2,3]` would be `f [1,2,3]`. This makes mapping as easy as a normal function call (and the operator name `` was not choosen arbitrarily. `$` by itsself is the function application operator, so `f $ 3` does on a single element, what `f x` maps over an instance of Functor.

With applicatives, the pattern of

    f  a  b  c
is very common (with a type signature

    f :: a -> b -> c -> ....

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

#27

Bryan Cantrill's take: https://youtu.be/0T2XFSALOaU?t=2021 My answer would be lazy evaluation by default. It's extremely unusual, and I've never seen a convincing enough justification for it, and it gives rise to performance bugs (space leaks) that can be fiendishly difficult to track down and fix and are disastrous in production. With the arrival of Idris, I think we can pretty conclusively say this was a mistake an…

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 best kept for core data-structures and places where you know you can use it, and a strict by default variant of Haskell would be better, now that we have learned most of the lessens from lazyness.

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

#28

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…

Well, what you are doing is a "generalized" binary search. Suppose you have a four-stor(e)y house. You can start from the second floor and proceed a la standard binary search. You're putting an implicit ordering on the parts of your house, essentially, and then doing a search.

And the bit about cutting the search space to a third (which is what I believe you meant, instead of cutting it /by/ a third) is something you can also do when searching a list, but IIRC halving is preferred because it has better worst-case time-complexity. You can always split a list into 1/3 + 2/3 instead of 1/2 + 1/2, but you risk having to search the 2/3 every time, etc.

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

#29
post #6

My biggest complaint would be about incomplete documentation of GHC. Given that Haskell is a pure functional language, it should be possible to easily use any part of the compiler, and include it in your own project. However, the documentation is rather incomplete, difficult to understand, and always behind the current state of the code. That said, the scientific literature on Haskell is the complete opposite, and co…

I haven't found a language where that isn't the case.

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

#30
post #24

I just prefer to use languages without a Garbage Collector.

Any experience doing functional programming without garbage collector? I'm doing a lot of Clojure, and can't really see how it would be a pleasant experience without GC but curious to hear any interesting thoughts.

The closest I've tried is Rust, which is not 100% functional or 100% anything but I like it.
Post reply on HN