string vs String
Janice Caron
caron800 at googlemail.com
Thu Dec 13 23:18:43 PST 2007
On 12/14/07, davidl <davidl at 126.com> wrote:
>
> I noticed object.d alias string as invariant(char)[]
>
> But it's a bad choice of the name. string causes a lot name collision in
> my app.
So ... change your app?
Seriously, there's no way Walter could possibly have known what name
choices you had made in your app, unless you're suggesting that Walter
should be more clairvoyant.
> And as a type. with first char capitalized is a much better choice!!
And do you suppose that this would cause no name clashes at all with
anyone's apps? I imagine it would cause /more/. Anyone who's ever made
a string class has probably called it "String". To me, the lower case
s not only ensures fewer name clashes, but also makes it "feel" like a
primitive type (which it sort of almost is - I mean it's just an
array, not actually a class or a struct).
More information about the Digitalmars-d
mailing list