Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

After a decade of Scala and Rust I no longer believe in monads and prefer the way Go does error handling.

  for a <- a()
      b <- b() {
      return a + b
  }
  
looks nice but only by hiding error handling. Today I like looking at code and see the error handling. With monads you end up with monad stacks and transformers which introduce their own failure states.


I haven't played with Scala in a while, but Rust's error-handling is not syntactically monadic. If you look at the code, you don't see combinators, you see either error propagation or error handling.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: