dmd foreach loops throw exceptions on invalid UTF sequences, use replacementDchar instead

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Nov 5 10:08:30 UTC 2021


On Friday, 5 November 2021 at 06:30:02 UTC, FeepingCreature wrote:
> I think the program should crash in all these cases. The text 
> editor should crash. The browser should crash. The analyzer 
> should see a NaN, and crash.

No, NaN is completely different. You have two types of NaN, one 
is for signalling that data is missing in a dataset (received 
from the outside). The other is to convey that a computation 
failed (often caused by roundoff errors).

To remove NaN from floating point is unworkable in the general 
case.



More information about the Digitalmars-d mailing list