Hacker News new | ask | show | jobs
by WastingMyTime89 1393 days ago
To be fair, it’s hardly code golf. It’s just that Lwt takes a monadic approach to concurrency and that’s always going to look a bit strange to someone unfamiliar with using monads and who doesn’t know that (>|=) is fmap.

I never understood why Lwt chose this aweful operator by the way. That’s a really unfortunate choice. My guess is that they really want people to use their ppx extension. I really hope that eio will solve the current concurrency libraries mess.

It’s the same for the first exemple: if you don’t know (:>) is upcasting, you are going to wonder what you are reading. I have to confess I had to look for it. Despite using Ocaml professionally for a bit a decade ago, I never had to upcast anything.

It’s hardly beautiful code but it’s fairly readable.