Jump to page: 1 29  
Page
Thread overview
DIP1000: Scoped Pointers (Discussion)
Aug 10, 2016
Dicebot
Aug 10, 2016
Enamex
Aug 11, 2016
ZombineDev
Aug 11, 2016
ZombineDev
Aug 11, 2016
Walter Bright
Aug 11, 2016
Jacob Carlborg
Aug 11, 2016
ZombineDev
Aug 11, 2016
Dicebot
Aug 11, 2016
John Colvin
Aug 11, 2016
Walter Bright
Aug 11, 2016
John Colvin
Aug 12, 2016
John Colvin
Aug 12, 2016
Walter Bright
Aug 11, 2016
deadalnix
Aug 11, 2016
Walter Bright
Aug 12, 2016
Timon Gehr
Aug 12, 2016
Walter Bright
Aug 11, 2016
Kagamin
Aug 11, 2016
rikki cattermole
Aug 11, 2016
Martin Nowak
Aug 11, 2016
Walter Bright
Aug 11, 2016
Walter Bright
Aug 11, 2016
Walter Bright
Aug 12, 2016
deadalnix
Aug 12, 2016
Lodovico Giaretta
Aug 12, 2016
Walter Bright
Aug 12, 2016
Chris Wright
Aug 18, 2016
Dicebot
Aug 12, 2016
Walter Bright
Aug 11, 2016
Marc Schütz
Aug 11, 2016
deadalnix
Aug 11, 2016
Walter Bright
Aug 12, 2016
deadalnix
Aug 12, 2016
Walter Bright
Aug 12, 2016
Seb
[OT] Re: DIP1000: Scoped Pointers (Discussion)
Aug 12, 2016
Seb
Aug 13, 2016
deadalnix
Aug 13, 2016
deadalnix
Aug 12, 2016
Nick Treleaven
Aug 12, 2016
Kagamin
Aug 12, 2016
H. S. Teoh
Aug 11, 2016
Guillaume Piolat
Aug 11, 2016
sclytrack
Aug 11, 2016
sclytrack
Aug 11, 2016
Yuxuan Shui
Aug 12, 2016
Timon Gehr
Aug 12, 2016
Walter Bright
Aug 12, 2016
Timon Gehr
Aug 12, 2016
Walter Bright
Aug 12, 2016
Timon Gehr
Aug 13, 2016
deadalnix
Aug 14, 2016
Dicebot
Aug 14, 2016
Walter Bright
Aug 14, 2016
Dicebot
Aug 15, 2016
Kagamin
Aug 15, 2016
Dicebot
Aug 15, 2016
Walter Bright
Aug 15, 2016
Dicebot
Aug 15, 2016
Walter Bright
Aug 15, 2016
Chris Wright
Aug 15, 2016
Walter Bright
Aug 15, 2016
H. S. Teoh
Aug 15, 2016
Walter Bright
Aug 22, 2016
H. S. Teoh
Aug 22, 2016
Meta
Aug 22, 2016
H. S. Teoh
Aug 23, 2016
Dicebot
Aug 14, 2016
Dicebot
Aug 14, 2016
Walter Bright
Aug 14, 2016
Walter Bright
Aug 14, 2016
Walter Bright
Aug 14, 2016
Dicebot
Aug 14, 2016
Walter Bright
August 10, 2016
http://forum.dlang.org/post/pqsiqmkxenrwxoruzaml@forum.dlang.org

The first DIP has just landed into the new queue. It is a proposal from language authors and thus it bypasses usual nitpicking process and proceeds straight to requesting community (your!) feedback.

Essentially, it is an attempt to solve reference lifetime problem by extending implementation of `scope` keyword.

Proposal text: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md

Few notes:

- Please submit pull requests to adjust the markdown document if you want to propose any improvements (mentioning @WalterBright and @andralex for confirmation).
- The proposal refers to a number of other documents and it is recommended to become familiar at least briefly with all of them.
- At this point the question I'd personally suggest to be evaluated is "does this proposal enable enough useful designs?". A good check would be to try taking some of your projects and see if having DIP1000 approved and implemented could improve them.
August 10, 2016
On Wednesday, 10 August 2016 at 20:36:38 UTC, Dicebot wrote:
> http://forum.dlang.org/post/pqsiqmkxenrwxoruzaml@forum.dlang.org
>
> - Please submit pull requests to adjust the markdown document if you want to propose any improvements (mentioning @WalterBright and @andralex for confirmation).

Personally I wouldn't recommend directly submitting pull requests for improvement suggestions. Keep those in the forum/git discussions (maybe open an RFC issue on GitHub?) with the pull requests only after enough people have commented on the suggestions.

(I just don't want to have to follow several PR threads for every single improvement suggestion to every DIP in its final comment period.)
August 11, 2016
On Wednesday, 10 August 2016 at 20:36:38 UTC, Dicebot wrote:
> http://forum.dlang.org/post/pqsiqmkxenrwxoruzaml@forum.dlang.org
>
> The first DIP has just landed into the new queue. It is a proposal from language authors and thus it bypasses usual nitpicking process and proceeds straight to requesting community (your!) feedback.
>
> Essentially, it is an attempt to solve reference lifetime problem by extending implementation of `scope` keyword.
>
> Proposal text: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md
>
> Few notes:
>
> - Please submit pull requests to adjust the markdown document if you want to propose any improvements (mentioning @WalterBright and @andralex for confirmation).
> - The proposal refers to a number of other documents and it is recommended to become familiar at least briefly with all of them.
> - At this point the question I'd personally suggest to be evaluated is "does this proposal enable enough useful designs?". A good check would be to try taking some of your projects and see if having DIP1000 approved and implemented could improve them.

@Walter

What's current support in the master DMD branch for this DIP and what remains to be done? I know that some support was added in between the various @safe-ty fixes during July and August:
https://github.com/dlang/dmd/pulls?q=is%3Apr+author%3AWalterBright+created%3A"2016-06-07+..+2016-07-25"+sort%3Acreated-asc but I can't tell what's the overall progress.

BTW, great work fixing all those @safe-ty holes! The amount bugs you've managed to fix during this period is amazing!
August 11, 2016
On Thursday, 11 August 2016 at 07:13:34 UTC, ZombineDev wrote:
> On Wednesday, 10 August 2016 at 20:36:38 UTC, Dicebot wrote:
>> http://forum.dlang.org/post/pqsiqmkxenrwxoruzaml@forum.dlang.org
>>
>> The first DIP has just landed into the new queue. It is a proposal from language authors and thus it bypasses usual nitpicking process and proceeds straight to requesting community (your!) feedback.
>>
>> Essentially, it is an attempt to solve reference lifetime problem by extending implementation of `scope` keyword.
>>
>> Proposal text: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md
>>
>> Few notes:
>>
>> - Please submit pull requests to adjust the markdown document if you want to propose any improvements (mentioning @WalterBright and @andralex for confirmation).
>> - The proposal refers to a number of other documents and it is recommended to become familiar at least briefly with all of them.
>> - At this point the question I'd personally suggest to be evaluated is "does this proposal enable enough useful designs?". A good check would be to try taking some of your projects and see if having DIP1000 approved and implemented could improve them.
>
> @Walter
>
> What's current support in the master DMD branch for this DIP and what remains to be done? I know that some support was added in between the various @safe-ty fixes during July and August:
> https://github.com/dlang/dmd/pulls?q=is%3Apr+author%3AWalterBright+created%3A"2016-06-07+..+2016-07-25"+sort%3Acreated-asc but I can't tell what's the overall progress.
>
> BTW, great work fixing all those @safe-ty holes! The amount bugs you've managed to fix during this period is amazing!

For some strange reason, the link doesn't work in the web interface. Here is it again: https://git.io/v64sj
August 11, 2016
On 8/11/2016 12:13 AM, ZombineDev wrote:
> What's current support in the master DMD branch for this DIP and what remains to
> be done?

The current support has been stalled for 17 days now.

https://github.com/dlang/dmd/pull/5972


> I know that some support was added in between the various @safe-ty
> fixes during July and August:
> https://github.com/dlang/dmd/pulls?q=is%3Apr+author%3AWalterBright+created%3A"2016-06-07+..+2016-07-25"+sort%3Acreated-asc
> but I can't tell what's the overall progress.

Those are more reasonably considered bug fixes rather than 'return scope' which is the key feature of the DIP.


> BTW, great work fixing all those @safe-ty holes! The amount bugs you've managed
> to fix during this period is amazing!

Actually, it's been quite fun and satisfying. I want to finish it!
August 11, 2016
On 10/08/16 22:36, Dicebot wrote:
> http://forum.dlang.org/post/pqsiqmkxenrwxoruzaml@forum.dlang.org
>
> The first DIP has just landed into the new queue. It is a proposal from
> language authors and thus it bypasses usual nitpicking process and
> proceeds straight to requesting community (your!) feedback.
>
> Essentially, it is an attempt to solve reference lifetime problem by
> extending implementation of `scope` keyword.
>
> Proposal text: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md

DIP 1_000? Is this the one DIP to rule them all, making all the 900 DIPs or so you skipped over not necessary :)

-- 
/Jacob Carlborg
August 11, 2016
On Wednesday, 10 August 2016 at 20:36:38 UTC, Dicebot wrote:
> Proposal text: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md

Can someone talk me through the lifetime algebra for the following?

void foo()
{
    int a;
    int** c;
    void bar()
    {
        int* b = &a;
        c = &b;
    }
    bar();
    *c; //undefined behaviour
}

I think it's this:

lifetime(a) = all of foo
lifetime(c) = infinite (because null) //initially
lifetime(b) = lifetime(&a) = lifetime(a) = all of foo // ????
lifetime(c) = lifetime(&b) = lifetime(b) = all of foo //on assignment in bar

That would suggest that dereferencing c was OK, because the lifetime is all of foo. What am I missing?
August 11, 2016
On Thursday, 11 August 2016 at 08:07:08 UTC, Jacob Carlborg wrote:
> On 10/08/16 22:36, Dicebot wrote:
>> http://forum.dlang.org/post/pqsiqmkxenrwxoruzaml@forum.dlang.org
>>
>> The first DIP has just landed into the new queue. It is a proposal from
>> language authors and thus it bypasses usual nitpicking process and
>> proceeds straight to requesting community (your!) feedback.
>>
>> Essentially, it is an attempt to solve reference lifetime problem by
>> extending implementation of `scope` keyword.
>>
>> Proposal text: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md
>
> DIP 1_000? Is this the one DIP to rule them all, making all the 900 DIPs or so you skipped over not necessary :)

Probably :D, though it was the first available (See https://github.com/dlang/DIPs/blame/master/README.md#L27 for more info). Maybe one of the other two DIPs should have taken 1000, but I think it's nice coincidence, considering the implications of DIP1000 ;)
August 11, 2016
On 8/11/2016 1:29 AM, John Colvin wrote:
> Can someone talk me through the lifetime algebra for the following?
>
> void foo()
> {
>     int a;
>     int** c;
>     void bar()
>     {
>         int* b = &a;  <= ok, b has a smaller lifetime than a
>         c = &b;    <= error, c has a larger lifetime than b
>     }
>     bar();
>     *c; //undefined behaviour
> }

August 11, 2016
On Thursday, 11 August 2016 at 08:45:38 UTC, Walter Bright wrote:
> On 8/11/2016 1:29 AM, John Colvin wrote:
>> Can someone talk me through the lifetime algebra for the following?
>>
>> void foo()
>> {
>>     int a;
>>     int** c;
>>     void bar()
>>     {
>>         int* b = &a;  <= ok, b has a smaller lifetime than a
>>         c = &b;    <= error, c has a larger lifetime than b
>>     }
>>     bar();
>>     *c; //undefined behaviour
>> }

but according to this rule:

"For an unrestricted pointer, visibility is dictated by the usual lexical scope rules. Lifetime, however is dictated by the lifetime of the data to which the pointer points to."

b should have the same lifetime as a, no?
« First   ‹ Prev
1 2 3 4 5 6 7 8 9