D's confusing strings (was Re: D on hackernews)
Christophe
travert at phare.normalesup.org
Wed Sep 21 12:18:17 PDT 2011
"Simen Kjaeraas" , dans le message (digitalmars.D:144921), a écrit :
> What you are thinking about is a code point.
Yes, sorry. Then I disagree with "as long as char is a unicode code
unit, that's the way that it goes", since myString.front should then
return a code unit, whereas it actually returns a code point.
>> Unicode operations should be supported by a different class that
>> is really a lazy range of dchar implemented as an undelying char[], with
>> no length, index, or stride operator, and appropriate optimizations.
>
> I can agree with this, but the benefits over what we already have are nigh
> zilch.
I think no one here as any illusion about changing this in D2.
However, this class could be introduced in phobos right now, without
changing anything about string. It would simply be a bit safer than
strings.
--
Christophe
More information about the Digitalmars-d
mailing list