It can be done if the D compiler emits full runtime type info. It's a solved problem with GCs.How do you implement a moving GC in D if D has
raw pointers?
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.
D semantics doesn't allow the GC to automatically modify those
pointers when the GC moves the data.
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.)