[PATCH] D57896: Variable names rule
Zachary Turner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 21 13:12:20 PST 2019
zturner added a comment.
In D57896#1405334 <https://reviews.llvm.org/D57896#1405334>, @MyDeveloperDay wrote:
> In D57896#1402280 <https://reviews.llvm.org/D57896#1402280>, @zturner wrote:
>
> > Since someone already accepted this, I suppose I should mark require changes to formalize my dissent
>
>
> As it was Chris @lattner who accepted it, is your request for changes just based on the fact that it doesn't fit LLDB style?
(Side note, but I think everyones' opinions hold the same weight with regards to issues like this, and that is in part why changes like this are so difficult to move forward with. Because it takes a lot of consensus, not just one person, to drive a change.)
To answer your question: In a way, yes. To be clear, I don't actually care what the style we end up with is and I think arguing over which specific style we end up adopting is a silly argument. No style is going to be aesthetically pleasing to everyone, and I conjecture that any style we choose will have just as many people who dislike it as there are that like it. A coding style should serve exactly two purposes (in this order of importance): 1) Consistency across codebase, and 2) Visually distinguish semantically names that refer to semantically different things.
As long as it satisfies those two things, the specific choice of style is almost incosequential.
My objection is based on the fact adopting LLDB's style makes #1 **significantly better** at literally no incremental cost, while maintaining #2. So, the benefit of changing to literally any other style would be dwarfed by the benefit of changing to this particular style, because we would get instant consistency across a large swath of code.
If someone wants to propose a mass change of LLDB's names, I would actually be fine with that, but I suspect that will be just as difficult to drive, and so the path of least resistance here is to just use it and move on with our lives.
> I was trying to find where the LLDB coding style was documented but could only find this https://llvm.org/svn/llvm-project/lldb/branches/release_36/www/lldb-coding-conventions.html, seemingly this file has been move/removed around release 3.9.
>
> But reading that link its seems unlikely to find a concencous between either naming conventions or formatting style between LLDB and the rest of LLVM, unless of course the solution would be to adopt LLDB style completely (for which I'd suspect there would be counter objections)
If there are counter objections, I'd like to hear them. "I'm not a fan of that style" is not really a strong counter-objection in my opinion, because if we require a unanimous consensus on the most aesthetically pleasing style, I'm pretty sure nothing will ever happen. After all, I'm not a huge fan of LLDB's style myself. But as with any coding standard, you just deal with it.
> If that isn't a reality is blocking the rest of the LLVM community from relieving some of their eye strain an acceptable solution?
Inconsistency is worse than eye strain, because it *causes* eye strain, as well as discourages people from contributing to the code at all. Anyone who has worked on both LLDB and LLVM can attest to how jarring the shift is moving back and forth between them, and that is a much more serious problem than a subset of developers who don't like something and another subset who do.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57896/new/
https://reviews.llvm.org/D57896
More information about the cfe-commits
mailing list