4 ms·
It seems like the good ones about Clojure and Scala are buried beneath the pile of whining about Java and Ruby. Anyway, here's my 5 for Haskell. 1. Sometimes
by baguasquirrel 16y ago
It seems like the good ones about Clojure and Scala are buried beneath the pile of whining about Java and Ruby.
Anyway, here's my 5 for Haskell.
1. Sometimes the type system feels backwards. What if I don't want the compiler to infer types for my variables? What if I want the opposite, where it does constraint checking on said variables? For example, instead of inferring the type of the elements of a list, it instead makes sure that they all belong to a particular typeclass. This is a subtle but huge difference that makes it difficult for me to program UIs. It can be done, but it seems to take more effort than it does in some other languages.
2. Allowing the construction of infinite values leads to some really frustrating errors sometimes. Sometimes you make mistakes of the form "let x = f x", which is valid in some situations and not others.
3. Monad should imply Applicative should imply Functor.
4. Bytestring handling bites you in the ass sometimes and you don't know it until your program crashes because you mixed things up improperly. Something is wrong here, when we are losing type information that should have prevented this.
5. Typeclasses should be automatically derived for trivial cases, like witness types, but there's a strong potential for abuse there.
- yummyfajitas 16y agoActually, I'll go further and say I hate the existence of bytestrings. I should not be required to know about bytestrings to do text processing at a reasonable speed. (I have no opinion as to whether it's reasonable to use bytestrings for interaction with the FFI.)
- jrockway 16y agoWhat's so good about a linked list of characters? Really, I think most people complain about bytestrings because "foo" makes a "normal string". If it made a bytestring, who would care? Bytestrings do the same API that you'd expect from any traversable.
- yummyfajitas 16y agoNothing. That's my point -- strings suck, Haskell should implement strings as bytestrings or something that isn't slow.
- tumult 16y agoYou can make "foo" give you a literal ByteString instead of a [Char]. Use the OverloadedStrings GHC extension. You probably knew that already, though.
- jrockway 16y agoYeah. I thought you were saying the entire concept was worthless or something. (Incidentally, I have used plain [Char] strings in some Haskell apps, and the performance has been fine. But really, all I do is get them from a char* and print them, so...)
- samstokes 16y agoAccidentally downvoted this while intending to upvote, and now I can't undo - HN is not very mobile-friendly.
- baguasquirrel 16y agoYea that happens to me too. =/
- angelbob 16y agoI was surprised how far down I had to scroll for Ruby... I expected more people to have a love-hate relationship with it than apparently do. I also totally disagree that blocks should be passed as regular parameters, but that's neither here nor there.