Re: Ownership and Borrowing in D

2019-07-21 Thread 12345swordy via Digitalmars-d-announce

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.


We're likely going to add a move constructor, too.


Make sure that it is a separate pull request from the dip, as c++ 
std::string binding is currently block by the lack of this.


Re: Ownership and Borrowing in D

2019-07-21 Thread Max Haughton via Digitalmars-d-announce

On Sunday, 21 July 2019 at 20:20:10 UTC, Per Nordlöw wrote:

On Saturday, 20 July 2019 at 21:56:50 UTC, Walter Bright wrote:


We're likely going to add a move constructor, too.


And deprecate opPostMove?


Seems likely, especially given that DIP1014 hasn't been 
implemented in the language or made it into the spec yet.


Re: Ownership and Borrowing in D

2019-07-21 Thread Per Nordlöw via Digitalmars-d-announce

On Saturday, 20 July 2019 at 21:56:50 UTC, Walter Bright wrote:


We're likely going to add a move constructor, too.


And deprecate opPostMove?


Re: Ownership and Borrowing in D

2019-07-21 Thread Olivier FAURE via Digitalmars-d-announce

On Wednesday, 17 July 2019 at 20:59:27 UTC, Walter Bright wrote:
I'm interested to see your design. But I suggest you move 
quickly, as I've suggested people who talked about this propose 
a design for the last 10 years, nothing has happened, and we 
can't wait any longer.


For the record, I've been busy with WebAssembly proposals and 
haven't had the time to write a proper DIP this week.


That said, here's a **very, very rough** draft that conveys what 
the proposed design is about: 
https://gist.github.com/PoignardAzur/9896ddb17b9f6d6f3d0fa5e6fe1a7088


I'll try to make a PR before next week-end.