<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 4 February 2014 06:21, Adam Wilson <span dir="ltr"><<a href="mailto:flyboynw@gmail.com" target="_blank">flyboynw@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Mon, 03 Feb 2014 12:02:29 -0800, Andrei Alexandrescu <<a href="mailto:SeeWebsiteForEmail@erdani.org" target="_blank">SeeWebsiteForEmail@erdani.org</a><u></u>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2/3/14, 6:57 AM, Frank Bauer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Anyone asking for the addition of ARC or owning pointers to D, gets<br>
pretty much ignored. The topic is "Smart pointers instead of GC?",<br>
remember? People here seem to be more interested in diverting to<br>
nullable, scope and GC optimization. Telling, indeed.<br>
</blockquote>
<br>
I thought I made it clear that GC avoidance (which includes considering built-in reference counting) is a major focus of 2014.<br>
<br>
Andrei<br>
<br>
</blockquote>
<br></div></div>
Andrei, I am sorry to report that anything other than complete removal of the GC and replacement with compiler generated ARC will be unacceptable to a certain, highly vocal, subset of D users. No arguments can be made to otherwise, regardless of validity. As far as they are concerned the discussion of ARC vs. GC is closed and decided. ARC is the only path forward to the bright and glorious future of D. ARC most efficiently solves all memory management problems ever encountered. Peer-Reviewed Research and the Scientific Method be damned! ALL HAIL ARC!<br>
<br>
Sadly, although written as hyperbole, I feel that the above is fairly close to the actual position of the ARC crowd.</blockquote><div><br></div><div>Don't be a dick.</div><div>I get the impression you don't actually read my posts. And I also feel like you're a lot more dogmatic about this than you think I am.</div>
<div><br></div><div>I'm absolutely fine with GC in most applications, I really couldn't give any shits if most people want a GC. I'm not dogmatic about it, and I've **honestly** tried to love the GC for years now.</div>
<div>What I'm concerned about is that I have _no option_ to use D uninhibited when I need to not have the GC.</div><div><br></div><div>These are the problems:</div><div> * GC stalls for long periods time at completely un-predictable moments.</div>
<div> * GC stalls become longer *and* more frequent as memory becomes less available, and the working pool becomes larger (what a coincidence).</div><div> * Memory footprint is unknowable, what if you don't have a virtual memory manager? What if your total memory is measured in megabytes?</div>
<div> * It's not possible to know when destruction of an object will happen, which has known workarounds (like in C#) but is also annoying in many cases, and supports the prior point.</div><div><br></div><div>Conclusion:</div>
<div> GC is unfit for embedded systems. One of the most significant remaining and compelling uses for a native systems language.</div><div><br></div><div>The only realistic path I am aware of is to use ARC, which IS a form of GC, and allows a lot more flexibility in the front-end.</div>
<div>GC forces one very particular paradigm upon you.</div><div>ARC is a GC, but it has some complex properties __which can be addressed in various ways__. Unlike a GC which is entirely inflexible.</div><div><br></div><div>
You're not happy with ARC's cleaning objects up on the spot? Something that many people WANT, but I understand zero cleanup times in the running context is in other occasions a strength of GC; fine, just stick the pointer on a dead list, and free it either later during idle time, or on another thread. On the contrary, I haven't heard any proposal for a GC that would allow it to operate in carefully controlled time-slices, or strictly during idle-time.</div>
<div>Cycles are a problem with ARC? True, how much effort are you willing to spend to mitigate the problem? None: run a secondary GC in the background to collect cycles (yes, there is still a GC, but it has much less work to do). Some: Disable background GC, manually require user specified weak references and stuff. Note: A user-preferred combination of the 2 could severely mitigate the workload of the background GC if it is still desired to handle some complex situations, or user errors.<br>
</div><div>Are there any other disadvantages to ARC? I don't know of them if there are.</div><div><br></div><div>Is far as I can tell, an ARC collector could provide identical convenience as the existing GC for anyone that simply doesn't care. It would also seem that it could provide significantly more options and control for those that do.</div>
<div><br></div><div>I am _yet to hear anyone present a realistic path forwards using any form of GC_, so what else do I have to go with? Until I know of any other path forward, I'll stand behind the only one I can see.</div>
<div>You're just repeating "I don't care about something that a significant subset of D developers do care about, and I don't think any changes should be made to support them".</div><div>As far as I know, a switch to ARC could be done in a way that 'regular' users don't lose anything, or even notice... why is that so offensive?</div>
</div></div></div>