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

FeepingCreature feepingcreature at gmail.com
Thu Nov 4 05:41:47 UTC 2021


On Thursday, 4 November 2021 at 05:34:29 UTC, FeepingCreature 
wrote:
> One may disagree about autodecoding; I for one think it's a 
> sensible idea. However, a program should either process data 
> correctly or, if that is impossible, not at all. It should not, 
> ever, silently modify it "for you" while reading! I predict 
> this will lead to cryptic, hair-pulling bugs in user code 
> involving replacement characters appearing far downstream of 
> the error site.

(This is floating point NaN all over again!)


More information about the Digitalmars-d mailing list