toString vs. toUtf8

Lars Ivar Igesund larsivar at igesund.net
Mon Nov 19 13:49:19 PST 2007


Walter Bright wrote:

> Phobos (and D) has undergone some evolution in the thinking about
> unicode strings, and it certainly has a few anachronisms in its names.
> But I think we've evolved to the point where going forward, we know what
> to do:

We certainly don't include all of the D community (of which I would say
Tango is a large part, although some of Tango's users probably like your
suggestions). Was these names ever really up for discussion?
> 
> char[] => string
> wchar[] => wstring
> dchar[] => dstring
> 
> These are all unicode strings. Putting non-unicode encodings in them,
> even temporarily, should be discouraged. Non-unicode encodings should
> use ubyte[], ushort[], etc.

This don't at all address the points Sean pulled forth on the naming of the
functions returning various encodings, regardless of the types returned.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango



More information about the Digitalmars-d mailing list