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.
