What's the go with the GC these days?
H. S. Teoh
hsteoh at quickfur.ath.cx
Mon Jan 7 02:00:05 UTC 2019
On Sun, Jan 06, 2019 at 01:25:32PM -0800, Walter Bright via Digitalmars-d wrote:
> On 1/6/2019 1:40 AM, Manu wrote:
> > It's all irrelevant though, Nobody's asking for multiple pointer
> > types in D. All I want from language support for ARC in D, is an
> > opInc/opDec function which are called appropriately around
> > assignments, and elided appropriately.
>
> 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?
> > copy ctor's can't offer this functionality.
>
> They can produce a working ref counting solution.
Care to elaborate? Is it related to how current move + postblit
semantics make it impractical to maintain a consistent ref count?
> 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?
T
--
Give a man a fish, and he eats once. Teach a man to fish, and he will sit forever.
More information about the Digitalmars-d
mailing list