<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 3, 2011 at 10:43 PM, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><br></div><div class="">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
How do you implement a moving GC in D if D has<br>
raw pointers?<br>
</blockquote>
<br></div>
It can be done if the D compiler emits full runtime type info. It's a solved problem with GCs.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
D semantics doesn't allow the GC to automatically modify those<br>
pointers when the GC moves the data.<br>
</blockquote>
<br></div>
Yes, it does. I've implemented a moving collector before designing D, and I carefully defined the semantics so that it could be done for D.<br>
<br>
Besides, having two pointer types in D would be disastrously complex. C++/CLI does, and C++/CLI is a failure in the marketplace. (I've dealt with multiple pointer types from the DOS daze, and believe me it is a BAD BAD BAD idea.)<br>

</blockquote></div><br></div><div class="gmail_extra"> Given the recent discussion on radical changes to GC and dtors, could someone please explain why having multiple pointer types is a bad idea? </div></div>