[llvm-dev] RFC: changing variable naming rules in LLVM codebase

Alex Bradbury via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 15 02:15:03 PST 2019


On Mon, 11 Feb 2019 at 23:20, Philip Reames via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
> I don't care about the convention, but I'm really not sure it's worth the churn which would result in the code base.  The hurtle which needs cleared here is not "is it a better naming style", but "is the disruption implied by changing to the new convention justified".  To be clear, not opposed, just hesitant.

I have the same concern. The whole advantage of a common coding
convention is consistency. There are exceptions, but the vast majority
of LLVM and Clang code I've read does indeed stick to the current
CamelCase convention. Unless there's a plan for conversion then the
practical impact of the naming convention change is that the codebase
will be a muddle of mixed conventions for years. That seems like a
regression, even if camelBack is a better convention.

On a more practical note, if the intent is to move to camelBack I
think it would be worth adding an example to the coding standard for
handling an acronym. e.g. is it the intent that TTI would become tti.

Best,

Alex


More information about the llvm-dev mailing list