Fixing C's Biggest Mistake

Dukc ajieskola at gmail.com
Wed Jan 11 13:38:42 UTC 2023


On Wednesday, 11 January 2023 at 10:57:18 UTC, Max Samukha wrote:
>
> I used to buy into the propaganda of the distinction between 
> "input" and "logic" errors. Now I beleive the distinction is 
> moslty useless. "Invalid state" becomes "input error" depending 
> on how you modularize the system.

Your observation does not contradict the original idea. An 
unrecoverable assertion failure is a recoverable input error from 
perspective of the operating system or a separate watchdog 
process - recoverable by restarting the crashed program. The 
point is, Each program needs to distinguish what it can handle by 
itself, and where it must consider itself out of control and 
leave it up to others to restart (or ditch) it.


More information about the Digitalmars-d mailing list