Should this work?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Jan 10 00:29:33 PST 2014


On 1/9/14 11:53 PM, Jacob Carlborg wrote:
> Even if you do get how ranges work it can be difficult to figure out
> where a function is located, in std.algorithms, std.string, std.array,
> std.uni or std.range. Like, "is this a string operation or a general
> container algorithm?". Why is there a std.string.indexOf function? Isn't
> that a general array operation or algorithm? Isn't
> std.string.(left|right)Justify a general operation as well?

That's a documentation issue. We've pursued generalization of string 
algorithms with good result. As such indexOf is susceptible for 
generalization. However, the justification functions are unlikely to be 
useful for other data types because most don't have a notion of "filler" 
object.

Andrei




More information about the Digitalmars-d mailing list