toString or not toString

Timon Gehr timon.gehr at gmx.ch
Wed Aug 31 05:35:34 PDT 2011


On 08/31/2011 04:41 AM, Jonathan M Davis wrote:
> Objects would have writeTo and toString would presumably be
> deprecated.
>

I have never understood the rationale behind deprecating toString once 
we have writeTo. Why should it be deprecated? toString is great in case 
you just want to quickly and easily convert something to a string, and 
later, if formatting or more efficient output etc. is needed, the method 
can transparently be replaced by writeTo.


More information about the Digitalmars-d mailing list