[Dlang-internal] DIP1000 discussion and testing

Dicebot via Dlang-internal dlang-internal at puremagic.com
Sat Oct 22 15:50:42 PDT 2016


On 10/22/2016 10:52 AM, Walter Bright wrote:
>> It won't allow to fix `Unique`, won't enable
>> new RNG design Joe has been going, won't allow easy skipping of
>> reference count inc/dec - the list goes on.
> 
> You're right, scope won't help at all in inc/dec skipping. But all is
> not lost. I have written up a short article on how the compiler can do
> inc/dec skipping, but it'll have to wait until we have an actual RC design.

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.

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/dlang-internal/attachments/20161023/7d008b84/attachment.sig>


More information about the Dlang-internal mailing list