Borrowing and Ownership

Paul Backus snarwin at
Mon Oct 28 00:23:32 UTC 2019

On Sunday, 27 October 2019 at 22:36:30 UTC, Timon Gehr wrote:
> - The problem with `@trusted` is that it has no defense against 
> `@safe` code destroying its invariants or accessing raw 
> pointers that are only meant to be manipulated by `@trusted` 
> code. There should therefore be a way to mark data as 
> `@trusted` (or equivalent), such that `@safe` code can not 
> access it.

Would it be possible to accomplish this by putting the @trusted 
code and data in its own module, and using private? Assuming that 
the outstanding loopholes that allow bypassing private in @safe 
code are fixed, at least.

More information about the Digitalmars-d mailing list