News for hackers. Stuff that matters.
Re:Rust for Python Programmers by bad_user on Wednesday May 27, 2015 @01:41PM (#9613042)
Rust's error handling is pretty good. First of all you see in the signature of the function that it can trigger an exception, so such a function will return Result<T, E> instead of just T. This is similar to Option, Either or Try in Scala, or to Maybe / Either in Haskell. To easily pipe such errors, Rust provides a try! macro, which just expands into a catch block.

Rust is less functional than Haskell or Scala, so I don't know how that works out, but in FP languages it ends up working great. Also, compared with Go it isn't the same thing.

There are no comments on this comment yet.