Direction for @safe/-dip1000
Walter Bright
newshound2 at digitalmars.com
Mon Feb 14 08:39:58 UTC 2022
On 2/13/2022 3:15 AM, Florian Weimer wrote:
> I've tried to figure out where this is heading. Is the eventual goal
> (irrespective of mechanism) that sticking `@safe` onto the `main` function will
> ensure memory safety for the whole program?
Yes, although @safe does not supply complete memory safety. The addition of
@live fills in much of the rest.
> What about data races in updates of multi-word variables? For example, the Go
> language makes avoiding them the responsibility of the programmer, but Java
> ensures that data races cannot subvert the type system (although with the demise
> of the security manager, some people argue that this should be changed).
It's up to the programmer to avoid data races in multi-word variables, likely by
manually using locks.
More information about the Digitalmars-d
mailing list