Simplification of @trusted

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Thu Jun 17 18:02:26 UTC 2021


On Thursday, 17 June 2021 at 17:49:39 UTC, Dukc wrote:
> This means that a `@trusted` or `@safe` function is allowed to 
> assume certain invariants about some types, as long as those 
> invariants cannot be violated from `@safe` client code alone. 
> This also means that `@safe` code that is in `module_a` may be 
> able to violate memory safety. DIP1035 aims to address that.

So if I control `module_0` and `module_a` depends on it, then I 
can assume the invariants for types in `module_0` as long as 
`module_b` cannot break those invariants from @safe code?



More information about the Digitalmars-d mailing list