On Borrow Checking
Timon Gehr
timon.gehr at gmx.ch
Sat May 17 19:21:36 UTC 2025
On 5/17/25 20:18, Walter Bright wrote:
> On 5/17/2025 7:32 AM, Lance Bachmeier wrote:
>> if it's payload is accessed only with the borrow function.
>
> And if the compiler cannot check that, it is not safe.
>
In principle it can. Other ways to access it just would not be `@safe`.
However, it looks like the guts are indeed not properly shielded via
`@system` variables from unsafe accesses through private fields (e.g.
with `.tupleof`).
The concept is sound in principle though, it's just a bit limited by
DIP1000's expressiveness.
More information about the Digitalmars-d
mailing list