Would you pay for GC?
Araq
rumpf_a at web.de
Tue Jan 25 10:34:59 UTC 2022
On Tuesday, 25 January 2022 at 09:58:14 UTC, Ola Fosheim Grøstad
wrote:
> On Tuesday, 25 January 2022 at 09:42:25 UTC, Araq wrote:
>> Only if you take the "deferred" RC route, which
>> Swift/Rust/C++/Nim do not!
>
> What do you mean by "deferred"? RC increment when taking a
> reference from the heap, but not when the reference is taken
> from the stack + periodic stack scanning?
>
That's what it means, yes.
> Actually, in C++ (and to some extent in Objective-C) you
> minimize reference counting by using programmer knowledge. You
> increment when you take it from the heap and from thereon you
> use a borrowed (raw) pointer down the call tree.
>
> Anyway, the key problem is not solved by "deferred RC". The key
> problem can only be solved by segmenting the heap in the type
> system.
I didn't claim that deferred RC is a "solution". My post was a
reply to another post.
More information about the Digitalmars-d
mailing list