DConf talk : Exceptions will disappear in the future?

sighoya sighoya at gmail.com
Wed Jan 6 18:31:15 UTC 2021


Citing Herb Sutter:
>As noted in §1.1, preconditions, postconditions, and assertions 
>are for identifying program bugs, they are never recoverable 
>errors; violating them is always corruption, undefined behavior. 
>Therefore they should never be reported via error reporting 
>channels (regardless of whether exceptions, error codes, or 
>another style is used). Instead, once we have contracts 
>(expected in C++20), users should be taught to prefer expressing 
>these as contracts, and we should consider using those also in 
>the standard library.

Oh men, did you ever hear of non-determinism?
Why not just use compile time contracts and path dependent typing 
to solve those problems as well?
Because perfectionism is our enemy in productive development.
And terminating the whole program doesn't help either, exactly 
for this purpose we have error types or contexts, to know to 
which degree we are required to terminate and this should hold 
even for contracts.


More information about the Digitalmars-d-learn mailing list