July 17
On Sunday, 16 July 2017 at 11:45:09 UTC, Nicholas Wilson wrote:
> On Friday, 14 July 2017 at 10:43:05 UTC, Mike Parker wrote:
>> DIP 1011 is titled "extern(delegate)".
>>
>> https://github.com/dlang/DIPs/blob/master/DIPs/DIP1011.md
>>
>> All review-related feedback on and discussion of the DIP should occur in this thread. The review period will end at 11:59 PM ET on July 28 (3:59 AM GMT July 29), or when I make a post declaring it complete.
>>
>> At the end of Round 1, if further review is deemed necessary, the DIP will be scheduled for another round. Otherwise, it will be queued for the formal review and evaluation by the language authors.
>>
>> Thanks in advance to all who participate.
>>
>> Destroy!
>
> Not that it is a requirement to consider fir this DIP, but how would this play with Vittorio's lambda Value capture DIP(?)?

I don't see any relation.  Looks like the lambda capture lowers to defining a temporary struct and assigning the captured values to fields in that struct, then the lambda is defined as a member function of that struct.  That member function already uses the delegate ABI where the context is a reference to the temporary struct.

void main()
{
    int x;
    string s;

    auto dg = [x,s]() => {
        // ...
    }
    /*
    lowers to something like this
    struct __lambda_struct__
    {
        int x;
        string s;
        // This method already has a context, cannot make it extern(delegate)
        void execute()
        {
            // ...
        }
    }
    auto dg = &__lambda_struct__(x, s).execute;
    */
}
July 24
On Friday, 14 July 2017 at 10:43:05 UTC, Mike Parker wrote:
> DIP 1011 is titled "extern(delegate)".
>
> https://github.com/dlang/DIPs/blob/master/DIPs/DIP1011.md
>
> All review-related feedback on and discussion of the DIP should occur in this thread. The review period will end at 11:59 PM ET on July 28 (3:59 AM GMT July 29), or when I make a post declaring it complete.
>
> At the end of Round 1, if further review is deemed necessary, the DIP will be scheduled for another round. Otherwise, it will be queued for the formal review and evaluation by the language authors.
>
> Thanks in advance to all who participate.
>
> Destroy!

I don't like it so much but also something like this could be considered:

out!(x => x>0)
or
out!x(x > 0)

that can't collide with current syntax



July 24
On Monday, 17 July 2017 at 15:16:45 UTC, Jonathan Marler wrote:
> On Sunday, 16 July 2017 at 11:45:09 UTC, Nicholas Wilson wrote:
>> [...]
>
> I don't see any relation.  Looks like the lambda capture lowers to defining a temporary struct and assigning the captured values to fields in that struct, then the lambda is defined as a member function of that struct.  That member function already uses the delegate ABI where the context is a reference to the temporary struct.
>
> [...]

Fair enough.
July 24
On 7/24/17 7:08 AM, Andrea Fontana wrote:
> On Friday, 14 July 2017 at 10:43:05 UTC, Mike Parker wrote:
>> DIP 1011 is titled "extern(delegate)".
>>
>> https://github.com/dlang/DIPs/blob/master/DIPs/DIP1011.md
>>
>> All review-related feedback on and discussion of the DIP should occur in this thread. The review period will end at 11:59 PM ET on July 28 (3:59 AM GMT July 29), or when I make a post declaring it complete.
>>
>> At the end of Round 1, if further review is deemed necessary, the DIP will be scheduled for another round. Otherwise, it will be queued for the formal review and evaluation by the language authors.
>>
>> Thanks in advance to all who participate.
>>
>> Destroy!
> 
> I don't like it so much but also something like this could be considered:
> 
> out!(x => x>0)
> or
> out!x(x > 0)
> 
> that can't collide with current syntax

I think you meant this for DIP 1009?

-Steve
July 25
On Monday, 24 July 2017 at 15:27:10 UTC, Steven Schveighoffer wrote:
>> I don't like it so much but also something like this could be considered:
>> 
>> out!(x => x>0)
>> or
>> out!x(x > 0)
>> 
>> that can't collide with current syntax
>
> I think you meant this for DIP 1009?
>
> -Steve

You're right, I had too many windows opened :)

Andrea
Next ›   Last »
1 2