Nim - Introducing --gc:arc

NaN divide at by.zero
Fri Dec 27 12:04:14 UTC 2019


On Friday, 27 December 2019 at 02:30:32 UTC, Walter Bright wrote:
> On 12/25/2019 5:27 PM, JN wrote:
>> Some folks may find it interesting, Nim is introducing a new 
>> memory management scheme:
>> 
>> "So ... this feature has been in development for quite some 
>> time now, Nim is getting the "one GC to rule them all". 
>> However calling it a GC doesn't do it justice, it's plain old 
>> reference counting with optimizations thanks to move 
>> semantics."
>> 
>> https://forum.nim-lang.org/t/5734
>
> D gave up on ARC for the time being because it was too easy to 
> free an ARC object while retaining a live pointer to its 
> innards (as pointed out by Timon Gehr). The solution to this is 
> ownership/borrowing, which I am working on.

Could you elaborate a bit more? IIRC its been said that 
ownership/borrowing is only for safe code? So will ARC only work 
in safe code too?


More information about the Digitalmars-d mailing list