Hacker News new | ask | show | jobs
by leereeves 4137 days ago
"There is a joy in programming with Haskell. ... There's so much working Haskell code out there, that you can just stare at days for and not really understand (but always use!)."

Is that a positive quality of Haskell?

1 comments

I think that, while there was a lot of good in the OP, this part was poorly communicated.

I'd guess that he's talking about something like the Lens library, which is incredibly easy to use, and comes from a place of great aesthetic sense, but whose type signatures take some time to really get. I had to work some things out on paper to see how the general Lens type signature:

    forall f. Functor f => (a -> f b) -> s -> f t
applied to all the "magic" that can be done with lenses. And then you also have Traversals and Prisms. There's lots of stuff that just works, but requires some depth of knowledge to understand how the magic is built. I imagine that Frames, as it matures, will be in the same category (you need a lot of type-level programming to get type-safe data-frames).

That said, I still don't understand how certain languages (that shall remain nameless, but I'm not talking about Haskell here) implemented a type-safe printf, but it was easy to use. In statically typed languages like Haskell, you get just some immediate insight into what you don't understand. In a dynamic one, you can be led to feel like you understand more than you actually do.

If you mean OCaml, the typesafe printf uses compiler magic.