July 04, 2017 Re: Beta 2.075.0-b1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dsby | On Tuesday, 27 June 2017 at 07:51:07 UTC, Dsby wrote: > what about DIP1000? Is it default? We'd definitely mention such a big change in our changelog. At the moment scope support is still experimental with a couple of known issues (https://issues.dlang.org/buglist.cgi?quicksearch=%5Bscope%5D). Fixing those and adding safe unique, ref-counted, and weak-ref primitives to druntime/phobos is a major focus for the 2nd half of 2017. |
July 04, 2017 Re: Beta 2.075.0-b1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mario Kröplin | On Tuesday, 27 June 2017 at 10:46:38 UTC, Mario Kröplin wrote: > It' not really intended to disallow comparisons between const(Status) and Status, isn't it? Sure not, please file a regression. > BTW: > There's a regression: running dmd with option -deps results in a segmentation fault. We can try to reduce the example. Yes, please do. Maybe dustmite can help you https://github.com/CyberShadow/DustMite/wiki/Detecting-a-segfault-in-dmd-itself. |
July 05, 2017 Re: Beta 2.075.0-b1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Nowak | On Tuesday, 4 July 2017 at 20:41:08 UTC, Martin Nowak wrote:
> On Tuesday, 27 June 2017 at 07:51:07 UTC, Dsby wrote:
>> what about DIP1000? Is it default?
>
> We'd definitely mention such a big change in our changelog. At the moment scope support is still experimental with a couple of known issues (https://issues.dlang.org/buglist.cgi?quicksearch=%5Bscope%5D).
> Fixing those and adding safe unique, ref-counted, and weak-ref primitives to druntime/phobos is a major focus for the 2nd half of 2017.
Will add in language : @ref @weak?
is it DIP47?
Or in library?
|
July 05, 2017 Re: Beta 2.075.0-b1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dsby | On Wednesday, 5 July 2017 at 01:40:49 UTC, Dsby wrote:
> Will add in language : @ref @weak?
> is it DIP47?
> Or in library?
We should be able to do it as library types.
The only case we currently know that might need help from the compiler, is passing multiple mutable rc/uniq references.
int boom(ref RC!S a, ref RC!int b)
{
destroy(a);
return b; // a might have been the sole owner of b
}
We might get away with disallowing calls with arguments, where one potentially owns the other. It looks like a minor use-case to me.
Incrementing the ref-count around the call was another option, but that wouldn't work with unique ownership.
|
July 06, 2017 Re: Beta 2.075.0-b1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Nowak | On Wednesday, 5 July 2017 at 07:25:34 UTC, Martin Nowak wrote:
> On Wednesday, 5 July 2017 at 01:40:49 UTC, Dsby wrote:
>> Will add in language : @ref @weak?
>> is it DIP47?
>> Or in library?
>
> We should be able to do it as library types.
> The only case we currently know that might need help from the compiler, is passing multiple mutable rc/uniq references.
>
> int boom(ref RC!S a, ref RC!int b)
> {
> destroy(a);
> return b; // a might have been the sole owner of b
> }
>
> We might get away with disallowing calls with arguments, where one potentially owns the other. It looks like a minor use-case to me.
> Incrementing the ref-count around the call was another option, but that wouldn't work with unique ownership.
Wait for the std.rc.
|
Copyright © 1999-2021 by the D Language Foundation