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

Thiago Farina tfransosi at gmail.com
Fri Dec 3 20:03:44 PST 2010


On Mon, Nov 29, 2010 at 5:02 AM, Anton Korobeynikov
<anton at korobeynikov.info> wrote:
>> I enjoyed the new coding style in recent patches. Camel case makes it easy
>> to pick a descriptive name. Starting functions and variables with lower
>> cases reduces chances to conflict with a type name.
> Honestly speaking, I don't. Especially in the cases when varname is
> made from an
> acronym. E.g. MachineInstr *MI looks much better than MachineInstr *mi, etc.
>

Hum? I don't think MI is better. I haven't see this style until
clang/llvm. Many others open source projects just uses the normal
lower case variable, which is MUCH better IMO.

For me is confusing to have a variable starting with captial letter,
because it's hard to differentiate it from class names.



More information about the cfe-dev mailing list