toString vs. toUtf8

Christopher Wright dhasenan at gmail.com
Mon Nov 19 14:55:00 PST 2007


Sean Kelly wrote:
> I was looking at converting Tango's use of toUtf8 to toString today and 
> ran into a bit of a quandry....

toUtf8 is ugly.
toString/toWString/toDString are opaque and ugly, hard to distinguish 
from each other.

toString, toStringW, toStringD? Still ugly.

toUtf, toUtf16, toUtf32? Slightly less clear, but easier to type.

toString, toUtf16, toUtf32? Inconsistent, but readable, and it fits well 
with other conventions.



More information about the Digitalmars-d mailing list