User:Ehsan/Safe C++: Difference between revisions

no edit summary
No edit summary
Line 161: Line 161:


One part of Rust's semantics that should be possible to implement without relying on const correctness much would be to disallow operator->() on an OwningRef while there are outstanding borrowed refs to it.  This will implement something similar to the idea of [http://rustbyexample.com/scope/borrow/freeze.html freezing] in Rust, but it remains to be seen how ergonomic that would be (given that outlawing operator-> in that case prevents read-only access to the underlying data as well.)
One part of Rust's semantics that should be possible to implement without relying on const correctness much would be to disallow operator->() on an OwningRef while there are outstanding borrowed refs to it.  This will implement something similar to the idea of [http://rustbyexample.com/scope/borrow/freeze.html freezing] in Rust, but it remains to be seen how ergonomic that would be (given that outlawing operator-> in that case prevents read-only access to the underlying data as well.)
=== TODO ===
* How to deal with copy constructors?
Confirmed users
657

edits