Lazy eval

Walter Bright newshound at digitalmars.com
Tue Aug 22 00:32:03 PDT 2006


Derek Parnell wrote:
> On Mon, 21 Aug 2006 20:54:36 -0700, Walter Bright wrote:
> 
> 
> By the way, are you also saying that given two functions ...
> 
>  	foo(T x);
>  and:
>  	foo(T delegate() x);
> 
> that the delegate signature will *always* be called rather than the
> non-delegate signature when calling with a 'T' argument?

No. It'll be an ambiguity error.


>>> Let's assume the original API said 
>> Suppose there's an API function:
> I guess my point is that this new feature increases the number of ways we
> can inadvertently stuff things up. So is the benefit going to outweigh the
> cost? Obviously its too early to know the answer to that yet.

I agree.



More information about the Digitalmars-d mailing list