What is a sink delegate?

Hjkp via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 10 04:35:18 PDT 2014


On Friday, 10 October 2014 at 04:42:04 UTC, thedeemon wrote:
> On Friday, 10 October 2014 at 03:06:33 UTC, Joel wrote:
>
>> How do you use that toString? Maybe an example?
>
> void main() {
>  	Try t = Try("Joel", 35);
> 	t.toString(s => writeln(s));
> }

I think that the problem pointed by the OP is that toString is 
usually used automatically for struct in std.conv when it's 
implemented. I'm myself quite dubitatif in front of this syntax, 
even if IIRC during one talk of the DConf 2014 someone claim 
that's it's faster.



More information about the Digitalmars-d-learn mailing list