GCs in the news

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 19 12:14:56 PDT 2014


On 7/17/2014 5:06 PM, H. S. Teoh via Digitalmars-d wrote:
> 	MyOutputRange sink;	// allocate using whatever scheme you want
> 	myInput.withoutTabs.copy(sink);
>
> The algorithm itself doesn't need to know where the result will end up
> -- sink could be stdout, in which case no allocation is needed at all.

Exactly! The algorithm becomes completely divorced from the memory allocation. I 
believe this is a very powerful technique.



More information about the Digitalmars-d mailing list