[llvm-dev] RFC: changing variable naming rules in LLVM codebase
Chandler Carruth via llvm-dev
llvm-dev at lists.llvm.org
Fri Feb 22 12:42:10 PST 2019
On Fri, Feb 22, 2019 at 9:40 AM David Greene via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> > So:
> > - 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.
> "lower_case" is a pretty drastic change from CamelCase and camelCase.
> So far the only argument for it I've seen is, "lldb uses it all over the
> place." Having one subproject drive the standard for everything else
> seems backward. It's certainly possible I missed other opinions on this
This is not how I described my preference for it. I prefer it generally and
find it substantially easier to read code using it.
That said, I think the fact that LLDB uses it does contribute two
1) It does show some subset of the community is familiar with it and has
found it to be a reasonably good convention for their usage.
2) It removes some cost of transition.
I wouldn't make the decision *because* of this, but I also don't think we
should ignore these points.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev