On Tuesday, 3 July 2018 at 04:54:46 UTC, Walter Bright wrote:
On 7/2/2018 7:53 PM, John Carter wrote:
Step 2 is to (gradually) migrate std:: standard library precondition violations in particular from exceptions (or error codes) to contracts. The programming world now broadly recognizes that programming bugs (e.g., out-of-bounds access, null dereference, and in general all pre/post/assert-condition violations) cause a corrupted state that cannot be recovered from programmatically, and so they should never be reported to the calling code as exceptions or error codes that code could somehow handle.

Ah, that's a really nice statement.

So, I have finally convinced the C++ world about that! Now if I can only convince the D world :-)

(I'm referring to the repeated and endless threads here where people argue that yes, they can recover from programming bugs!)

If this is the case then why do we need a reboot switch? Never say never!

If you really believe this then why do you print out minimal debug information when an error occurs? If programming bugs were essentially fatal, then wouldn't be important to give as much information when they occur so they can easily be fixed so they do not happen again?

Having too much information is a good thing!

Reply via email to