[PATCH] D54877: Update coding guidelines regarding use of `auto`

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 26 19:02:04 PST 2018


zturner added a comment.

In D54877#1308855 <https://reviews.llvm.org/D54877#1308855>, @zturner wrote:

> I'm against changes to the `auto` guidelines.  It is more important for code to be readable to other people, not yourself, because there is only 1 of you and there are many other people.  What I **explicitly do not want to happen** is for a reviewer to make a comment like "I find this unreadable" and then to have an author say "well it conforms to the style guidelines, so I'm going to keep it as is".
>
> If people find code unreadable, even for subjective reasons, it has to change.  Full stop.


That wording might have been stronger than my actual intent.  I'm not against loosening the wording surrounding auto, but at the end of the day, comments that arise in code review should take precedence over what the style guide does or doesn't say when it concerns readability, since it's an actual account of someone stating that they do or don't find something readable, and that's what we're trying to optimize for.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54877/new/

https://reviews.llvm.org/D54877





More information about the llvm-commits mailing list