Memory management design
Dicebot
public at dicebot.lv
Wed Jul 10 01:09:45 PDT 2013
On Wednesday, 10 July 2013 at 08:00:55 UTC, Manu wrote:
> I'd push for an ARC implementation. I've become convinced
> that's what I
> actually want, and that GC will never completely satisfy my
> requirements.
I think those issues are actually orthogonal. I'd love to have
verified @noheap attribute even in my old C code. Sometimes the
very fact that allocation happens is more important that
algorithm how it is later collected.
> Additionally, while I can see some value in @nogc, I'm not
> actually sold on
> that personally... it feels explicit attribution is a backwards
> way of
> going about it. ie, most functions may actually be @nogc, but
> only the ones
> that are explicitly attributed will enjoy that recognition...
> seems kinda
> backwards.
Yes, this is a common issue not unique to @nogc. I am personally
much in favor of having restrictive attributes enabled by default
and then adding "mutable" "@system" and "@allowheap" where those
are actually needed. But unfortunately there is no way to add
something that backwards-incompatible and attribute inference
seems the only practical way (though I hate it).
More information about the Digitalmars-d
mailing list