Zhanyong Wan (λx.x x)
2010-Nov-23 18:24 UTC
[LLVMdev] [cfe-dev] draft rule for naming types/functions/variables
On Tue, Nov 23, 2010 at 10:15 AM, Bo Persson <bop at gmb.dk> wrote:> > > > ----- 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?I would really appreciate it if we could focus on the high-level picture for the initial version of the rule. Given the complexity of C++, we'll always be able to find corner cases that the rule doesn't handle well, whatever rule we decide to use. As I mentioned in my initial post, my goal is to set up a baseline now and tweak it later based on feedback from actually using the rule. Thanks, -- Zhanyong
Reasonably Related Threads
- [LLVMdev] [cfe-dev] draft rule for naming types/functions/variables
- [LLVMdev] [cfe-dev] draft rule for naming types/functions/variables
- [LLVMdev] [cfe-dev] draft rule for naming types/functions/variables
- [LLVMdev] draft rule for naming types/functions/variables
- [LLVMdev] [cfe-dev] draft rule for naming types/functions/variables