But... I don't want my delegates to be lazy - breeding advice

Walter Bright newshound at digitalmars.com
Wed Aug 23 22:54:35 PDT 2006


Ok, I've thought about it a bit:

	void foo(int x);	// same as before 0.165
	void foo(int delegate() x)	// same as before 0.165

and now:

	void foo(lazy int x);

In other words, 'lazy' is now a parameter storage class. This means that:

	void foo(int x);
	void foo(lazy int x);

cannot be distinguished based on overloading, but:

	void foo(lazy int x);
	void foo(int delegate() x);

can be. The implicit conversion of a value to a delegate returning that 
value would be removed. The conversion happens always (not implicitly) 
if the parameter storage class is 'lazy'.



More information about the Digitalmars-d mailing list