Ownership and Borrowing in D
Sebastiaan Koppe
mail at skoppe.eu
Sat Jul 20 22:39:27 UTC 2019
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?
More information about the Digitalmars-d-announce
mailing list