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
[–] Fal@yiffit.net 9 points 10 months ago (2 children)

I fully support Result types, but you're probably better off using rust at that point

[–] porgamrer@programming.dev 6 points 10 months ago

I get your point, but in this case it's not that we are pining for our favourite features from other languages, it's that even C++20 doesn't support any sensible style of error handling.

It just says "here are exceptions but also don't actually use them lol".

I'm paid to work on a vast C++ codebase which I am free to modernise but not to port. But when it comes to error handling there's not really anything to modernise to, so it's just this hige maintenance burden I can't fix.

[–] BatmanAoD@programming.dev 5 points 10 months ago

...arguably you're better off using Rust anyway, if you have a choice.