<div class="gmail_quote">On Mon, Nov 22, 2010 at 9:36 PM, Zhanyong Wan (λx.x x) <span dir="ltr"><<a href="mailto:wan@google.com">wan@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Mon, Nov 22, 2010 at 9:30 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:<br>
> Sorry, this seems to have not followed the thread, but here was my comment:<br>
> <a href="http://codereview.appspot.com/3264041/diff/1/docs/CodingStandards.html#newcode801" target="_blank">http://codereview.appspot.com/3264041/diff/1/docs/CodingStandards.html#newcode801</a><br>
> docs/CodingStandards.html:801: camel case (e.g. <tt>TextFileReader</tt><br>
> and <tt>isLValue</tt>).<br>
> I would really prefer some stylistic difference between variables and<br>
> types/functions. This is mostly a problem (for me) with local variables,<br>
> where having some signifier of the locality helps me in reading it.<br>
<br>
</div>Agreed.  That's why types start with upper-case while variables start<br>
with lower-case in my proposal.<br></blockquote><div><br></div><div>This however leaves no distinction between functions and variables. I suppose this isn't a terrible compromise because of the ()s, but I would like it best to have a different style for each.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I chose to start function names with lower-case, but don't feel<br>
strongly about it.  If people prefer them to start with upper-case,<br>
fine by me.<br></blockquote><div><br></div><div>I wonder which is better for function names. I don't mind collision in style between function and type names as much as between variable names and other names, but that's just my personal preference.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I think camelCase works as well as underscore_separated for variable<br>
names, and the former is much more common in the existing code.<br>
That's why I picked it.  I could go with underscore_separated were we<br>
starting from scratch.<br></blockquote><div><br></div><div>This is a good point regarding consistency. I'm curious if this is a good time for more dramatic changes, and if so whether we want to consider having distinctions for all of the above, but if not, I'm not opposed to the proposed change. I see it as a definite improvement.</div>
</div>