toString vs toUtf8???

Gregor Richards Richards at codu.org
Sun Dec 16 22:17:05 PST 2007


Jarrett Billingsley wrote:
> "davidl" <davidl at 126.com> wrote in message news:op.t3gmbbugeb62bo at lzg...
>> I really don't get why there was an argument about it.
>> Obviously tango team chose a bad name. toUtf8 has nothing to do with 
>> enforcing a
>> string to utf8 encoded. Thus, toUtf8 is misleading. And as a library API , 
>> the
>> design goal is to make each API simple. And design is a process of solving 
>> problems.
>> While solving problems needs to decompose. It's a common sense to 
>> decompose problems.
>> But why when we come to this toString and toUtf8, we forget to decompose??
>>
>> Decompose toUtf8 -> we get toString -> Encode_String_Utf8
>>
>> Someone might argue toString is too long to type. But toStr is even 
>> shorter than toUtf8
> 
> What? 
> 
> 

Second.

  - Gregor Richards



More information about the Digitalmars-d mailing list