Feedback Thread: DIP 1033--Implicit Conversion of Expressions to Delegates--Final Review

ag0aep6g anonymous at example.com
Sat Nov 21 07:24:48 UTC 2020


On 20.11.20 08:30, Mike Parker wrote:
> https://github.com/dlang/DIPs/blob/8e56fc593ece5c74f18b8eb68c3f9dcedf2396a7/DIPs/DIP1033.md 

In the rationale:

> string delegate() base = getcwd()

Later, there's this on 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.

But as the rationale shows, the expression can also consist of a 
function call like `getcwd()`. The DIP fails to show how

     string delegate() base = getcwd()

is desirable, but

     string function() base = getcwd()

isn't.


More information about the Digitalmars-d mailing list