toString vs. toUtf8

Lars Ivar Igesund larsivar at igesund.net
Tue Nov 20 00:35:59 PST 2007


Bill Baxter wrote:

> Kris wrote:
>> "Sean Kelly" <sean at f4.ca> wrote in message
>> [snip]
>>>> Don't know if that hurts your eyes less or not, but it seems more
>>>> consistent with Tango's existing naming convention to me than
>>>> toWString, etc.
>>> Yeah I was thinking the same thing.  It's certainly easier for me to
>>> read than the other form.
>> 
>> 
>> Bill: actually, toString, toStringW and toStringD are more consistent
>> with themselves, and with Tango convention. Even toString, toString16 and
>> toString32 are significantly more style-consistent than toWString and
>> toWstring
> 
> How so?
> toString returns a string.
> toInt    returns an int.
> toFloat  returns a float.
> to???    returns a wstring.
> 
> Seems whatever goes in the ??? place should include the letters
> "w-s-t-r-i-n-g" in that order.

Only if you have recognized wstring and dstring as good names for those
aliases <g>

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



More information about the Digitalmars-d mailing list