Feedback Thread: DIP 1033--Implicit Conversion of Expressions to Delegates--Community Review Round 1
Walter Bright
newshound2 at digitalmars.com
Thu Apr 23 01:05:04 UTC 2020
On 4/22/2020 5:14 AM, Steven Schveighoffer wrote:
>> Function Pointers
>> Implicit conversion of expressions to function lambdas is not done. There
>> doesn't seem much point to it, as there will be no arguments to the function
>> lambda, meaning the expression can only consist of globals.
>
> Why does it have to consist only of globals?
>
> int delegate() = 3;
>
> doesn't use any globals. Why shouldn't this work?
>
> int function() = 3;
Because it seems kinda pointless to support function pointers only with constants.
While it is not impossible to support function pointers with this, I can't think
of a compelling use case.
> Also typo here:
>
>> Currently, arguments to lazy paraeters
>
> parameters
Sorry. I meant "paræters"
More information about the Digitalmars-d
mailing list