Built-in RAII in D
qznc via Digitalmars-d
digitalmars-d at puremagic.com
Tue May 30 03:30:13 PDT 2017
On Sunday, 28 May 2017 at 18:50:02 UTC, Nerve wrote:
> On Sunday, 28 May 2017 at 18:38:21 UTC, Moritz Maxeiner wrote:
>> All in all, I see little to no benefit to what you propose,
>> while requiring significant work on the language spec.
>
> Point taken. My only remaining reservation then is the
> communication problem D has with the wider prospective
> programming world in conveying that the GC has alternatives
> that work.
I agree.
Currently, a good answer is to direct people to the "Don't fear
the reaper" [0] article, but I feel it does not really address
all concerns of people. Concerns like:
* How much of Phobos does not work with @nogc? A good answer
would probably be case studies of larger programs/companies. Does
Weka use @nogc a lot?
* How to work around the GC? The reaper article does not mention
RefCounted.
* Limitations of @nogc? It does not prevent *another* thread to
call the GC, which might then stop the world. We have to mention
the trick to create threads which are not tracked by GC.
* How good is the D GC? Will it improve in the foreseeable
future? Information about the performance of the current GC is
quite dated, although I guess not much has changed.
Also, p0nce has some more GC tricks:
https://p0nce.github.io/d-idioms/
[0] https://dlang.org/blog/2017/03/20/dont-fear-the-reaper/
More information about the Digitalmars-d
mailing list