On 2014-02-05 22:19:27 +0000, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> said:
I want to make one positive step toward improving memory allocation in
the D language.
I know. But I find your proposal confusing.
Perhaps this is just one piece in your master plan where everything
will make sense once we have all the pieces. But this piece by itself
makes no sense to me; I have no idea where you're going with it.
Is this the continuation of the old thread where you wanted ideas about
how to eliminate hidden allocations in buildPath? Doesn't sound like it.
Or is this about implementing ARC in the language for those who can't
use the GC? The changes for this need to be done at a lower level
(compiler, runtime), and no change would be required in Phobos.
Or maybe this is to please the @nogc crowd by making things
reference-counted by default? While I'm not a fan of @nogc, this will
not work for them either as your proposal allocates from GC memory and
this will sometime trigger a collect cycle.
Or maybe you're trying to address the following issue: if we change D's
GC to use the ARC+GC scheme, what if I don't want to
increment/decrement at pointer assignment and instead rely purely on
mark and sweep for certain pointers? I'm not sure if someone asked for
that yet, but I guess it could be a valid concern.
So, what problem are we trying to solve again?
--
Michel Fortin
michel.for...@michelf.ca
http://michelf.ca