this post was submitted on 11 Nov 2023
19 points (88.0% liked)

C++

1723 readers
10 users here now

The center for all discussion and news regarding C++.

Rules

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] aport@programming.dev 4 points 10 months ago (1 children)

Me, still using negative int values to represent errors in 2023 ๐Ÿ˜ด

[โ€“] lysdexic@programming.dev 6 points 10 months ago

Me, still using negative int values to represent errors in 2023 ๐Ÿ˜ด

The C++ committee really dropped the ball by adding std::optional in C++17 but failing to follow suit and add a std::result monadic vocabulary type similar to Rust's std::result. Supporting a vocabulary type that provides syntactic sugar to handle both success and error return types represents a missed opportunity to improve C++'s readability and developer experience.