DIP23 draft: Fixing properties redux
TommiT
tommitissari at hotmail.com
Tue Feb 5 12:08:44 PST 2013
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
More information about the Digitalmars-d
mailing list