News for hackers. Stuff that matters.
Re:Dark side of ergonomics in Rust by anacrolix on Saturday April 14, 2018 @10:28AM (#16837440)
The flaw is in the language syntax. With a language that allows a lightweight, more general manipulation of flow you just get

    open filepath `catch` handle_file_not_found >>= use_file_handle
    handle_file_not_found :: FileNotFoundError -> IO a
    use_file_handle :: FileHandle -> IO a
Re:Dark side of ergonomics in Rust by jstimpfle on Saturday April 14, 2018 @10:41AM (#16837487)
Sure, I know Haskell too, and that code above is a mouthful... I'm undecided what is worse in terms of "control flow is all over the code base" and "code is hard to understand" - C++ RAII or Haskell error handling. Moreover the latter comes in a thousand incompatible flavours. Have fun writing Monad transformers :-). It's next to impossible to engineer a robust and readable/maintable application this way (besides simply dying on errors).