What's the go with the GC these days?
Timon Gehr
timon.gehr at gmx.ch
Mon Jan 7 23:51:29 UTC 2019
On 06.01.19 04:02, Meta wrote:
> On Saturday, 5 January 2019 at 23:51:53 UTC, Nicholas Wilson wrote:
>> On Saturday, 5 January 2019 at 22:42:11 UTC, Meta wrote:
>>> On Saturday, 5 January 2019 at 22:05:19 UTC, Manu wrote:
>>>> Is progress possible, or is the hard reality that the language is
>>>> just designed such to be resistant to a quality GC, while the
>>>> ecosystem sadly tends to rely on it?
>>>>
>>>> Where's the ARC stuff? What happened to opAddRef/opRelease?
>>>
>>> As per Andrei's talk at the last Dconf, ref counting requires
>>> __mutable to play nicely with const and immutable.
>>
>> I'd rather have opHeadMutable than __mutable, does the same thing but
>> doesn't subvert the type system
>
> I'm fairly dubious of adding __mutable as well, but I'm assuming the
> previous solution of using an AfixAllocator didn't pan out.
It can't work without `__mutable` because it breaks transitivity of
immutability. The entire point of `__mutable` is to add a transitivity
escape hatch for (@system-level data structure and runtime
implementations) that doesn't block high-level optimizations based on
immutability and purity.
> I don't know
> enough about opHeadMutable to consider whether it would address the same
> problems.
It's orthogonal. If you have an immutable object, it can't have a
reference to a reference count without `__mutable`. opHeadMutable can't
change that.
More information about the Digitalmars-d
mailing list