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

rikki cattermole rikki at cattermole.co.nz
Thu Nov 4 11:59:41 UTC 2021


On 04/11/2021 8:51 PM, Elronnd wrote:
> What is (potentially) questionable imo is that given foreach (c; a), c 
> will be inferred to be dchar; you have to explicitly ask for char.  
> Perhaps that default should be reversed.  (This will definitely break 
> code, though, and may not be worth it.)

I think this is the right answer.

Fix the default. Less surprises, less head aches, everyone is happy.


More information about the Digitalmars-d mailing list