News for hackers. Stuff that matters.
Re:Switching from C++ to Rust by mgraczyk on Monday March 13, 2023 @10:49PM (#35146747)
Worth mentioning that C++23 adds something very similar to the standard library, called std::expected.

https://en.cppreference.com/w/cpp/utility/expected

Unfortunately it does not come with nice syntax to return on error.

Re:Switching from C++ to Rust by loeg on Tuesday March 14, 2023 @12:48PM (#35154425)
Nice.

> Unfortunately it does not come with nice syntax to return on error.

Yeah. We use a C preprocessor macro for this, but it's a little more verbose than question-mark operator.