On 4/21/2014 10:57 AM, Steven Schveighoffer wrote:
On Mon, 21 Apr 2014 13:28:24 -0400, Walter Bright <[email protected]>
wrote:
On 4/21/2014 5:00 AM, Steven Schveighoffer wrote:
Total replacement of GC with ARC in D will:
This is the wrong straw-man, I'm not advocating for this at all.
Many are when they advocate ARC for D.
Does that preclude you from accepting any kind of ARC for D?
No. My objection is to pervasive ARC, i.e. all gc is replaced with ARC, and it
all magically works.
5. Numerous posters here have posited that the overhead of ARC can be
eliminated with a sufficiently smart compiler (which does not exist).
You continue to speak in extremes. People are saying that the compiler can
eliminate most of the needless ARC increments and decrements, not all of them.
Manu, for example, suggests it is good enough to make the overhead
insignificant. I'm skeptical.
Compilers that do this do exist.
I can't reconcile agreeing that ARC isn't good enough to be pervasive with
compiler technology eliminates unnecessary ARC overhead.
I know. shared_ptr would, of course, be used at the specific discretion of the
programmer. It would not be under the hood, and it would not be memory safe.
Doesn't RefCounted do this already?
Yes, but I haven't really looked into RefCounted.