Re: Why don't Function Lambdas Cast to Delegate?

2016-11-21 Thread Rene Zwanenburg via Digitalmars-d-learn
On Monday, 21 November 2016 at 16:24:38 UTC, Q. Schroll wrote: 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 cu

Re: Why don't Function Lambdas Cast to Delegate?

2016-11-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/21/16 11:24 AM, Q. Schroll wrote: 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 toDe

Why don't Function Lambdas Cast to Delegate?

2016-11-21 Thread Q. Schroll via Digitalmars-d-learn
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 reaso