Using exceptions in C++ desktop and server applications overall made sense to me. As I expanded my usage of C++ into other domains, specifically embedded domains, I began to experience more compelling reasons not to use exceptions first-hand…

From lobste.rs

  • lysdexic@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    Well, in Rust, it’s a sum-type

    The discussion is on to use monads in C++, and not on why is C++ different than Rust.

    I repeat: you do not need sum types to implement a Result monad in C++.