Why the hell doesn't foreach decode strings

Steven Schveighoffer schveiguy at yahoo.com
Fri Oct 21 04:14:00 PDT 2011


On Fri, 21 Oct 2011 00:43:20 -0400, Walter Bright  
<newshound2 at digitalmars.com> wrote:

> On 10/20/2011 9:06 PM, Jonathan M Davis wrote:
>> It's this very problem that leads some people to argue that string  
>> should be
>> its own type which holds an array of code units (which can be accessed  
>> when
>> needed) rather than doing what we do now where we try and treat a  
>> string as
>> both an array of chars and a range of dchars. The result is  
>> schizophrenic.
>
> Making such a string type would be terribly inefficient. It would make D  
> completely uncompetitive for processing strings.

I don't think it would.  Do you have any proof to support this?

-Steve


More information about the Digitalmars-d mailing list