A Philosophy of Software Design

Forum User forumuser at example.com
Sun Jun 28 15:50:04 UTC 2026


On Sunday, 28 June 2026 at 10:12:17 UTC, Kapendev wrote:
> You can misuse any feature, even good ones like NaN.

The question is: Does that feature support your work or does it 
complicate it?

> It's a number type.

NaNs are values, not types.

> You usually want to continue executing instead of crashing when 
> doing math.

That depends on what kind of program you have. If you write 
software for the navigation of military drones it is usually not 
necessary to also crash the program.

If you write a program which influences political decision making 
you should favor crashing over giving poor advise.

> "Garbage data" in this specific case is good and an OK way to 
> handle errors.

Garbage data is a sign of a numerical error which is by 
definition not "good". And having garbage data lingering around 
for later programmatical examination is the very last thing you 
want.

> If it was another kind of type,

Uh, now it is not a type?



More information about the Digitalmars-d mailing list