On Borrow Checking
jmh530
john.michael.hall at gmail.com
Fri May 9 17:17:33 UTC 2025
On Wednesday, 7 May 2025 at 23:21:12 UTC, Timon Gehr wrote:
> On 5/7/25 16:47, jmh530 wrote:
>>
>> I can think of a few different ways forward (by no means
>> limited to just this)
>
> Well, the big issue here is that @live is still not transitive.
> A function attribute is not really the right way to go about
> this anyway. Aliasing is a property of a pointer, not a
> function.
I think the difficulty is figuring a way to convince Walter of
this point. It's one thing to assert that it is true, it's
another to prove it.
That's why in my last post, I was kind of like, "ok what's the
goal, what would we have to do to achieve it." If it can't be
achieved with the function attribute approach, then it should be
abandoned. But I would hope we can salvage this effort into
something useful.
To your point about being a property of a pointer, the
alternative approach is to introduce a reference that is borrow
checked. Yes, it results in additional pointer types, but if
that's the approach that Rust ultimately relies on and it's the
only way to achieve what we want, then it's what should be done.
More information about the Digitalmars-d
mailing list