Why people violate this rule so much?
virtual function should be named
using CamelCase, not unix_hacker style. Can we stop doing this, and
enforce it somehow?
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
virtual function should be named
using CamelCase, not unix_hacker style. Can we stop doing this, and
enforce it somehow?Please read the appropriate section of the style guide
Working on content made me really, really, really hate this part of
our style guide.
I'd much rather have consistent CamelCase naming that doesn't have to
be changed when we refactor things, make things virtual to allow
overriding them, change a trivial function to be less trivial (e.g. to
cache a variable) and so forth.
Cheers,
Jói
Working on content made me really, really, really hate this part of
our style guide.
I'd much rather have consistent CamelCase naming that doesn't have to
be changed when we refactor things, make things virtual to allow
overriding them, change a trivial function to be less trivial (e.g. to
cache a variable) and so forth.
BTW, can anyone actually think of a case where they would've written their code differently if a member function used CamelCase instead of linux_hacker style?
On Wed, Apr 25, 2012 at 11:02 AM, Andrew Wilson <atwi...@google.com> wrote:BTW, can anyone actually think of a case where they would've written their code differently if a member function used CamelCase instead of linux_hacker style?Well, the obvious one is that I always try to declare local variables to hold the results of CamelCase functions called more than once as long as the results should be constant, whereas with unix_hacker functions I often just call the function again.
I don't know about larger architectural decisions. I think I may have made a couple of those, but they seem much rarer.I think some of my appreciation for unix_hacker functions comes from confusion when reading the views codebase, which originally used CamelCase for pretty much everything, and I found myself constantly wondering "why is THAT expensive? Is it doing some sort of chained lookup on the... oh wait, I guess it's not really expensive, they were just lying to me."
PK
Anyhow, I don't tend to be dogmatic about style issues, so I'm not really suggesting that we change this - just that we should recognize that there are real costs to this element of our style guide, and it's not clear there are commensurate benefits.