[cfe-dev] draft rule for naming types/functions/variables

Bo Persson bop at gmb.dk
Tue Nov 23 10:15:01 PST 2010


  ----- Original Message ----- 
  From: Chandler Carruth 
  To: Zhanyong Wan (λx.x x) 
  Cc: Argyrios Kyrtzidis ; clang-dev Developers 
  Sent: Tuesday, November 23, 2010 6:40 AM
  Subject: Re: [cfe-dev] draft rule for naming types/functions/variables


  On Mon, Nov 22, 2010 at 9:36 PM, Zhanyong Wan (λx.x x) <wan at google.com> wrote:

    On Mon, Nov 22, 2010 at 9:30 PM, Chandler Carruth <chandlerc at google.com> wrote:
    > Sorry, this seems to have not followed the thread, but here was my comment:
    > http://codereview.appspot.com/3264041/diff/1/docs/CodingStandards.html#newcode801
    > docs/CodingStandards.html:801: camel case (e.g. <tt>TextFileReader</tt>
    > and <tt>isLValue</tt>).
    > I would really prefer some stylistic difference between variables and
    > types/functions. This is mostly a problem (for me) with local variables,
    > where having some signifier of the locality helps me in reading it.


    Agreed.  That's why types start with upper-case while variables start
    with lower-case in my proposal.



  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.

What if the variable is an function object? 


Bo Persson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101123/41e77251/attachment.html>


More information about the cfe-dev mailing list