On Friday, 13 July 2018 at 12:43:20 UTC, Atila Neves wrote:
The only thing I got from this are that "smooth references" are
like Rust's borrows. Which just gave me the idea to add this
member function to `Unique`:
scope ref T borrow();
I have to think about @safety guarantees but it should be ok
with DIP 1000.
Atila
Sounds interesting.
I imagine you could specialize this depending on mutability. Rust
allows only one mutable borrow, but eliminated immutable borrows,
but you can't mix them. You could also place some restrictions,
like dis-allow borrows, only allow immutable borrows, etc.