What's the go with the GC these days?

Walter Bright newshound2 at digitalmars.com
Mon Jan 7 02:27:45 UTC 2019


On 1/6/2019 6:00 PM, H. S. Teoh wrote:
> On Sun, Jan 06, 2019 at 01:25:32PM -0800, Walter Bright via Digitalmars-d wrote:
>> It turns out to be fiendishly difficult to automatically elide counter
>> bumps.
> Just out of curiosity, any concrete examples of difficulties that
> prevent easy elision of counter bumps? Just so we have a better idea of
> the challenges we're up against.  Are there any common cases that are
> easy enough to implement, that might be "good enough", leaving more
> tricky cases aside?

See:

https://digitalmars.com/d/archives/digitalmars/D/draft_proposal_for_ref_counting_in_D_211885.html

There's more on the Dlang-study mailing list:

Dlang-study at puremagic.com
http://lists.puremagic.com/cgi-bin/mailman/listinfo/dlang-study

>>> copy ctor's can't offer this functionality.
>> They can produce a working ref counting solution.
> Care to elaborate?
https://github.com/RazvanN7/DIPs/blob/efacbf8efde8027291113633984b0e7a039e8f30/DIPs/DIP1xxx-rn.md


>> D's will have a couple fundamental advantages over the C++ one:
>>
>> 1. D won't need the locking on the increment, because D has different
>> types for threaded vs non-threaded.
>>
>> 2. With dip25 and dip1000, D can offer memory safe access to rc object
>> contents.
> 
> dip25 and dip1000 have been around for a long time now. What are the
> remaining issues blocking their full implementation / deployment?

dip25 is becoming the default compiler behavior.

dip1000 needs getting Phobos to compile with dip1000. Now that 
https://github.com/dlang/dmd/pull/8504 is merged, I still need to improve it 
with `return` inference.


More information about the Digitalmars-d mailing list