On Tuesday, 5 February 2013 at 18:33:36 UTC, Andrei Alexandrescu
wrote:
[..]
Walter and I reviewed the discussion and had a long talk. We
are very seriously considering banning the use of & against a
ref result from a function (and actually ref parameters and
even struct members in @safe code). [..]
Did you consider using Rust's idea of 'Named lifetimes' in order
to make ref parameters memory-safe. I haven't given much thought
to it, but since Rust's borrowed pointers are effectively
isomorphic to D's ref variables, it should work. Here's a Rust
borrowed pointer tutorial:
http://static.rust-lang.org/doc/tutorial-borrowed-ptr.html