Smart pointers instead of GC?

Walter Bright newshound2 at digitalmars.com
Tue Feb 4 16:50:57 PST 2014


On 2/4/2014 4:07 PM, Frank Bauer wrote:
> Regarding different pointer types in Rust as function arguments:
>
> A function that takes a borrowed pointer &T can also be called with an owning
> pointer ~T, an RC pointer Rc<T>, or a GC pointer Gc<T>. They all convert neatly
> to a &T. One function to rule them ... err .. accomodate all.

Again, what happens with:

     T identity(T t) { return t; }

? I.e. the transference of the argument pointer type to the return type?


More information about the Digitalmars-d mailing list