<div dir="ltr">On 24 September 2013 00:05, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org" target="_blank">SeeWebsiteForEmail@erdani.org</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><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 9/22/13 10:37 PM, Walter Bright wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 9/22/2013 9:19 PM, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Following this train of thought, I can imagine a really nice end goal<br>
would be<br>
that the existing GC is effectively plugged in as a library, and<br>
people can<br>
easily substitute it for their own GC if they want/need to.<br>
</blockquote>
<br>
It already is, and has been from the beginning. Rainer, for example,<br>
uses a different GC for VisualD.<br>
</blockquote>
<br></div></div>
Correct.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
dmd knows naught about the GC.<br>
</blockquote>
<br></div>
Well except for plugging a library call for calls to new. But that's expected.<br>
<br>
(I'm already pretending delete doesn't exist :o).)</blockquote><div><br></div><div>delete is important if your class is being allocated by a pool or something...</div><div>But you said before, people won't use 'new' if they are using an allocator. I'm really not sure that's a good idea.<br>
</div><div>Most people (library authors!) don't actually care about their memory allocation, they will continue to use 'new', just because it's a keyword.<br></div><div>It also screws with generic code; X should be allocated with 'new', but Y should be allocated with yAllocator.alloc()?<br>
</div><div>What if you decide that Z, which allocates with 'new', becomes a problem and you want to switch it into a pool? You now need to track down every instance of 'new Z', and change it.</div></div></div>
</div>