Object.toString, toHash, opCmp, opEquals
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Fri Apr 26 19:28:46 UTC 2024
On 27/04/2024 1:33 AM, Timon Gehr wrote:
> On 4/26/24 15:27, Timon Gehr wrote:
>
> The borrow checker does solve it, though. ...
>
> It does not, because it does not actually get aliasing under
> control. It adds checks that are incomplete
>
> (And also insufficient.)
Yes, this is something I've been trying to explain (highly
unsuccessfully I might add) from pretty much day 1 of @live.
For a borrow checker to actually be useful, it must start from the point
of allocation and track all the way to deallocation.
But in my view there are two behaviors here:
- Ownership transfer
- Owner/borrow relationship
The owner/borrow relationship is the thing Walter has just given me
green light on to do a DIP for that I've been wanting for years.
That relies on DIP1000 to detect relationships via the use of ``return``
(talked with Dennis, confirmed that this is what is *meant* to be
happening).
The ownership transfer however is what I want to see solved with
isolated. This solves aliasing since which sub graph of memory is in
each variable at the point of a transfer.
More information about the Digitalmars-d
mailing list