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

Elronnd elronnd at elronnd.net
Fri Nov 5 23:08:01 UTC 2021


On Friday, 5 November 2021 at 22:31:59 UTC, Elronnd wrote:
> On Friday, 5 November 2021 at 10:30:27 UTC, Ola Fosheim Grøstad 
> wrote:
>> I also think it would be useful to have something stronger 
>> than @safe, like a  @non-trojan marker for libraries, which 
>> basically says that it is impossible for that library to do 
>> evil and have that statically checked by the compiler.
>
> pure

Hmm, technically pure code can infinite loop and cause a DOS.  
But any useful language will be able to get arbitrary recursion 
depth even if it is proved to terminate (e.g. cpp), sooo...

And there is also the obvious pitfall of debug-in-pure.


More information about the Digitalmars-d mailing list