std.string and std.algorithm: what to do?
SeeWebsiteForEmail at erdani.org
Thu May 14 08:25:27 PDT 2009
> == Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s article
>> I'm not sure what needs to be done about the combo string + algorithm.
>> There's quite some overlap, and also functions that have the same name
>> in both modules (e.g. find()), which forces you to disambiguate.
>> Should std.algorithm automatically recognize strings and proceed
>> accordingly, should it just consider them straight arrays and leave
>> everything else to std.string (risky!), or refuse to handle strings?
> I like the idea of automatically specializing on strings, at least on the surface.
> It's less to remember for the programmer, less annoying naming collisions, and
> stuff "just works". You get your generic std.algorithm stuff when you need it and
> your more optimized/variable length character encoding stuff when you need it
> without having to explicitly specify which one you want.
Cool! So then how do I rename find, ifind, rfind, and irfind in std.string?
More information about the Digitalmars-d