[llvm-dev] RFC: changing variable naming rules in LLVM codebase
Chris Lattner via llvm-dev
llvm-dev at lists.llvm.org
Wed Feb 27 14:54:13 PST 2019
> On Feb 22, 2019, at 12:39 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
> On Fri, Feb 22, 2019 at 5:59 AM via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> - Local variables and formal parameters should be lower_case, with
> one exception: Variables/parameters that have lambda/function
> type should follow the function-name spelling rules.
> I really dislike this exception. Callable objects are *objects* and locally scoped, I would much prefer they look like variables.
Agreed, this is one of the baseline rationales for going with lowerCamel for variables and functions, and UpperCamel for types. C++ doesn’t have a reasonable metatype system, and so this is a very useful fork between worlds. Functions are first class values that can be address-taken, passed around and have other transformations applied to them, so they are fundamentally value-y.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev