toString vs. toUtf8
BCS
ao at pathlink.com
Mon Nov 19 14:06:36 PST 2007
Reply to Jarrett,
> "Sean Kelly" <sean at f4.ca> wrote in message
> news:fhsts6$5nn$1 at digitalmars.com...
>
>> As an alternative, I can only suggest that toUTF8, toUTF16, and
>> toUTF32 be named toString, toWString, and toDString, respectively,
>> and Unicode should be assumed as the standard encoding format in D.
>>
> Do you want to know my single overriding reason for wanting toString
> instead of toUtf8? Because it's nicer-looking and easier to type.
>
> My other reasons include consistency (Java uses .toString, .Net uses
> .ToString, phobos uses .toString) and that "toUtf8" screams "I'm a
> string class and this method converts my encoding!" while "toString"
> says "convert this object, whatever it is, to some kind of string."
>
> votes += 8 for toString, toWString, and toDString.
>
shouldn't that be?
votes += 8 for toString
votes += 16 for toWString
votes += 32 for toDString.
More information about the Digitalmars-d
mailing list