Rename std.string.toStringz?
Ali Çehreli
acehreli at yahoo.com
Sat Jun 18 07:00:50 PDT 2011
On Sat, 18 Jun 2011 02:59:07 -0700, Jonathan M Davis wrote:
> toWStringz to match toStringz
That's amusing. :) toString is a name that morphs the type name (string -
> String) due to following an insufficient naming standard adamantly. In
a perfect world the name of the function should be to_string (or
fortunately to!string in D's case).
Although this naming standard produces that broken name, we stop
following it when producing the name of a sister function. The logic that
produced toString should insist on toWstring. :p (Or perhaps we are
implying that wstring should be wString or WString to begin with?)
I humbly recommend that we put some more engineering in programming in
general but at least when naming. Camel casing is broken as it produces
the same name for two separate types:
string -> toString
String -> toString
I know it's too late for toString but it should be fine to use
underscores where camel casing doesn't work:
string -> to_string
String -> to_String
Ali
More information about the Digitalmars-d
mailing list