On Borrow Checking

Timon Gehr timon.gehr at gmx.ch
Sun May 18 14:01:18 UTC 2025


On 5/18/25 14:20, claptrap wrote:
> On Saturday, 17 May 2025 at 14:03:05 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>>
>> On 17/05/2025 10:05 PM, claptrap wrote:
>>>
>>> Why is safe ref counting not feasible with D?
>>
>> Because we don't have a borrow checker.
>>
>> Any kind of pointer originating from the ``this`` pointer of a RC 
>> type, must not outlive the RC owner.
> 
> We have the same problem with manual memory management don't we? So is 
> "safe manual memory management" considered not possible in D?

It's possible to some extent, you just cannot hand out raw pointers to 
manually allocated memory.


More information about the Digitalmars-d mailing list