Prime sieve language race

Sebastiaan Koppe mail at
Wed Jul 14 07:08:23 UTC 2021

On Tuesday, 13 July 2021 at 19:45:48 UTC, ag0aep6g wrote:
> On Tuesday, 13 July 2021 at 19:06:12 UTC, Bastiaan Veelo wrote:
>>     // If not called from multiple threads, this can be 
>> trusted.
> I.e., it can't be trusted. When a function needs a comment that 
> explains how to call it safely, then it's an @system function.

Why can't non-threadsafe functions be @safe? Because it might 
corrupt memory?

On a static function that is probably the right thing to do. But 
what about with a member function? I would argue it isn't.

More information about the Digitalmars-d mailing list