Hacker News new | ask | show | jobs
by boyswan 2950 days ago
You forgot the best bit... variants and pattern matching!
1 comments

True! I suppose I'm comparing to Elm mainly.
Also for your issue with deeply nested options, have a look at this

https://medium.com/w3reality/working-with-option-using-maybe...

And if you don't want to implement the option monad yourself, there's the bs-abstract library, which contains a bunch of category theory definitions and implementations. I have gotten a lot of mileage out of it even in the small amount of ReasonML I have written. That plus ppx_let offers a pretty good monadic programming experience.
Those are both helpful suggestions, thanks guys. I've looked at some of those blog posts and github threads before but haven't tried it out.

In the end, however, it's more bolted-on pieces that should be part of the language if you ask me.