[OT] OT: Null checks.
Timon Gehr
timon.gehr at gmx.ch
Tue May 6 17:02:25 UTC 2025
On 5/6/25 18:29, H. S. Teoh wrote:
> On Tue, May 06, 2025 at 05:48:18PM +0200, Timon Gehr via Digitalmars-d wrote:
>> On 5/6/25 08:11, Walter Bright wrote:
> [...]
>>> The reason is that `Error` means the program has entered an invalid
>>> state. Nothing in the program can be trusted any more. The program
>>> should do as little as possible to close down gracefully. ...
>>
>> "The patient has a light cough. The patient has thereby entered an
>> invalid state. The doctors must now do as little as possible before
>> they blow up the hospital in order to euthanize the patient and
>> everyone else that may have been in contact with them."
>
> That's not a very accurate analogy. A closer analogy to a program
> trying to fix itself would be a patient self-diagnosing and
> self-medicating. "I think I'm hyperventilating because I have type B
> diabetes. Let me take these pills and hope for the best."
> ...
You are wrong. I do not want the program to fix itself. I want the
program to subject itself to examination. In the way that I have
determined is useful for my particular application.
>
>> I want to diagnose and heal the patient!
> [...]
>
> Yes, but the patient can hardly be trusted to diagnose and heal himself.
> In order for treatment to be reliable, the doctor, so to speak, must be
> a separate, independent process that hasn't been compromised yet.
> ...
I am the doctor. The information I have to go on now is "the patient is
unwell sometimes".
More information about the Digitalmars-d
mailing list