Hacker News new | ask | show | jobs
by svnpenn 1487 days ago
> extremely cumbersome

I'd say the opposite. I'd say it beats the hell out of Rust syntax, as Rust would force you to have staircase code here. No thank you.

1 comments

FWIW, that's because Rust also doesn't have a Result monad, it merely has a Result type: in Haskell, you would provide the actual operations of the Monad trait for your Result type--the way in which values are converted into and used from within the type: two functions called return and (>>=)--which would allow you to delegate the execution of that abstracted boilerplate to the language's do-notation.