Should this work?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Jan 10 08:14:06 PST 2014


On 1/10/14 12:49 AM, Jacob Carlborg wrote:
> On 2014-01-10 09:29, Andrei Alexandrescu wrote:
>
>> 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.
>
> They might not have a default "filler" object but you can pass the
> "filler" as an argument.

By that I was implying that the whole notion is not sensible for general 
types. Honest, I did consider generalizing everything in std.string, but 
the algorithms left in there made little sense for other types than strings.

Andrei




More information about the Digitalmars-d mailing list