[LLVMdev] RFC: variable names

Chandler Carruth chandlerc at google.com
Mon Oct 13 17:17:46 PDT 2014


On Mon, Oct 13, 2014 at 5:15 PM, Sean Silva <chisophugis at gmail.com> wrote:

> On Mon, Oct 13, 2014 at 3:19 PM, Chandler Carruth <chandlerc at google.com>
> wrote:
>
>> On Mon, Oct 13, 2014 at 3:04 PM, Nick Kledzik <kledzik at apple.com> wrote:
>>
>>> I’d like to discuss revising the LLVM coding conventions to change the
>>> naming of variables to start with a lowercase letter.
>>>
>>
>> Almost all of your negatives of the current conventions also apply to
>> your proposed convention.
>>
>> Type names: CamelCase
>> Function names: camelCase
>> Variable names: ???
>>
>> If we name variables in camelCase then variable names and function names
>> collide.
>>
>> If we are going to change how we name variables, I very much want them to
>> not collide with either type names or function names. My suggestion would
>> be "lower_case" names.
>>
>
> In my experience, lower_case and lowerCase clash regardless when there is
> only one "word" (e.g. `foo` and `foo`) which is pretty frequent.
>

As I have clarified in other parts of the thread, this tends to not happen
in practice between functions and variables. :: shrug ::
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141013/2b4ec064/attachment.html>


More information about the llvm-dev mailing list