renamepalooza time
Jonathan M Davis
jmdavisProg at gmx.com
Fri Jan 21 17:25:14 PST 2011
On Friday, January 21, 2011 15:17:00 bearophile wrote:
> Jonathan M Davis:
> > Most? I've never dealt with a coding style that had underscores. It's
> > generally camelcase, though I get the impression that using underscores
> > in C code is more common (I've mostly used C++ and Java). Regardless
> > however, Phobos' coding style uses camelcase, not underscores.
>
> You are right. But I'd like to know why Phobos uses camelcase instead of
> underscores (as used in C and Python). I think variable names in camelcase
> are less noisy.
Probably because Walter and/or other folks working on it early on preferred
camelcase. I'm welling to bet that a fair number of the current Phobos devs are
the same (though apparently, Andrei isn't, given one of his posts in this
thread). I expect that Phobos uses camelcase simply because that's what enough
of the Phobos developers (particularly early developers) were used to.
Personally, camelcase vs underscores isn't even something that I normally think
about. I just always use camelcase. On _rare_ occasion, I might use underscores
because it seems to fit a particular situation, but that's _really_ rare. The
only time that I normally stick underscores in variable names is to indicate
private member variables. But I find using underscores in names to generally be
ugly and noisy. I expect that a lot of that just comes down to what you're used
to though.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list