Use case: eliminate hidden allocations in buildPath

Jacob Carlborg doob at me.com
Thu Dec 5 00:45:07 PST 2013


On 2013-12-05 09:09, monarch_dodra wrote:

> Use an output range. It's the generic D approach, and what we already do
> for the string functions such as std.string.translate:
> http://dlang.org/phobos/std_string.html#.translate
> (look down for the output range overloads).
>
> Anything "allocator" related should be carried by the output range
> itself. The function itself should not care nor know about any of that.

In general case, what would you suggest for functions not operating on 
ranges?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list