[Dlang-internal] DIP1000 discussion and testing

Walter Bright via Dlang-internal dlang-internal at puremagic.com
Sun Oct 23 19:29:35 PDT 2016


On 10/22/2016 3:50 PM, Dicebot wrote:
> Beauty of borrowing is that it allows to to inc/dec skipping with no
> special RC support from compiler and works the very same for stack
> allocated data. What you are going at is simply replacing GC with
> (compiler enhanced) RC and that is not good at all.

I don't see why supporting something beyond RC and GC is necessary.

> Would you at least be willing to consider an alternative proposal before
> `scope` branch is merged for release? I have a feeling that with
> relatively few changes to DIP1000 rules we can both have the cookie and
> eat it (i.e. get a way to express non-transitive borrowing), more in
> spirit of original proposal by Marc.

It'd have to be a big improvement over DIP1000, without sacrificing easy use. I 
find Rust's system to be seriously restrictive, off-putting, and hear many 
reports of users fighting its borrow checker. (I have not written any Rust code 
myself.)

At some point we need to move forward. We are already years late. Another month 
has slipped by.

I am also not convinced that you cannot do what you want to do with DIP1000. I 
do not understand why it is necessary to return the address of a value passed by 
ref, when one can return by ref.



More information about the Dlang-internal mailing list