On Saturday, 20 July 2019 at 21:56:50 UTC, Walter Bright wrote:
On 7/20/2019 5:42 AM, Sebastiaan Koppe wrote:
Anyway my question is whether the ownership and borrowing
semantics ever gets applied to non-pointers?
Currently, no. The programmer would be expected to include the
correct copyctor/opAssign/destructors which would take care of
it.
Do you mean to keep track of ownership/borrowedness manually?
Sure, that will work. But how would I then get the compiler to
complain when a borrowed one outlives the owned one?