Why don't Function Lambdas Cast to Delegate?
Q. Schroll via Digitalmars-d-learn Mon, 21 Nov 2016 08:25:57 -0800
Why don't lambdas cast to a delegate if they are of type R
function(Args)? I don't see any reason to that; a lambda should
be a delegate type by default, and a function only as a special
guarantee/optimization. It just makes them cumbersome to use with
toDelegate.
Probably there is a good reason why R function(Args) does not
implicitly cast to R delegate(Args); I can imagine something
internally (memory layout etc.) causes that. I'd just like to
know.
- Why don't Function Lambdas Ca... Q. Schroll via Digitalmars-d-learn
- Re: Why don't Function L... Steven Schveighoffer via Digitalmars-d-learn
- Re: Why don't Function L... Rene Zwanenburg via Digitalmars-d-learn