I seriously question how committed C++ is to zero-cost abstractions when they designed and standardized an entire standard library that assumes you’re using exceptions and doesn’t really work well without them.
-
-
as the person who ported llvm's libunwind to bare metal, trust me, I do know that :p i think it's ok, on its own, to consider exceptions zero cost. few abstractions have -completely zero- runtime cost, but you aren't arguing against reentrant functions here, are you?
-
what i'm questioning here is, in general, the extremely specific definition of "zero cost" that cherry picks some specific runtime costs and almost completely disregards everything else
- 3 more replies
New conversation -
-
-
That's true, but so do error code tests.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I wonder if an exception that is provably never caught can be optimized to abort()?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
But Result<T, E> adds extra memory read/write and extra `if`s and Rust still says it's zero-cost abstraction....
-
Disambiguating between an expected return value and some sort of error code is still something you would have to do anyway. Zero cost abstraction doesn’t mean it has no overhead, just that is has no overhead over the non-abstracted alternative.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.