string is rarely useful as a function argument

Sean Kelly sean at invisibleduck.org
Sat Dec 31 08:25:14 PST 2011


I'm not sure I understand what's wrong with length.  Of all the times I get a length in one sizable i18nalized app at work I can think of only one instance where I actually want the character count rather than the byte count. Is there some other reason I'm not aware of that length is undesirable?

Sent from my iPhone

On Dec 30, 2011, at 4:12 PM, Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:

> On 12/30/11 6:07 PM, Timon Gehr wrote:
>> alias std.string.representation raw;
> 
> I meant your implementation is incomplete.
> 
> But the main point is that presence of representation/raw is not the issue. The availability of good-for-nothing .length and operator[] are the issue. Putting in place the convention of using .raw is hardly useful within the context.
> 
> 
> Andrei


More information about the Digitalmars-d mailing list