Use case for std.bind

bearophile bearophileHUGS at lycos.com
Tue Feb 24 04:50:05 PST 2009


downs:

> auto dg = &foo /rfix/ somevar;			// 1.0, tools
> auto dg = _bind(&foo, _1, somevar);		// 1.0, std.bind
> auto dg = (int a) { return foo(a, somevar); };	// 2.0, literal

I like none of those :-) (but the 2.0 literal is a bit better).

Bye,
bearophile



More information about the Digitalmars-d mailing list