Comment

Comment by sushisource

As much as I want to use Haskell for real, instead of just reading about and toying with it, I think the examples in this article are a perfect illustration of why I find learning Haskell borderline obnoxious at times.

  data S a
  data R a
  
  newCaps :: (R a ⊸ S a ⊸ IO ()) ⊸ IO ()
  send :: S a ⊸ a ⊸ IO ()
  receive :: R a ⊸ (a ⊸ IO ()) ⊸ IO ()

  In this API, S is a send capability: it gives the ability to send a message. R is a receive capability...
At least here the author reasonably explains the snippet (this article is actually just fine generally), but so much of the Haskell examples online are just like this. Single letters for every type/variable. Why aren't S and R just called SendCapability and ReceiveCapability? It's almost like the Haskell community takes pride in being as obscure as possible, which I think is very possibly true.
parent sushisource 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton