[OT] OT: Null checks.
Walter Bright
newshound2 at digitalmars.com
Tue May 6 08:03:28 UTC 2025
On 5/5/2025 11:30 PM, Max Samukha wrote:
> Why would you assume that the code that doesn't rely on the GC is in a working
> state?
You're right, there's no guarantee whatsoever that *any* of the code or data is
in a valid state.
But it's much less code, so correspondingly much less likely to have been corrupted.
I prefer the "Go Directly To Jail, Do Not Pass Go, Do Not Collect $200" method
of dealing with crashed programs, hence my preference for executing an invalid
instruction. That comes from my experience with avionics in aircraft, where when
an invalid state is detected the faulty box is immediately electrically isolated
from the rest of the airplane, and the backup is engaged.
But, of course if you want logging, you'll have to risk it.
I would not enable such logging in any critical software, but it seems I am the
only such person.
More information about the Digitalmars-d
mailing list