r174504 - Optionally derive formatting information from the input file.
djasper at google.com
Wed Feb 6 13:02:45 PST 2013
Also, I honestly don't see the big issue with StringSwitch. We have solved
most of the bad layouting around it (I still think my marking the bug as
fixed was appropriate). The only remaining issue is that we put several
cases into one line which other people do with normal switch statements,
too. It does not terribly hurt readability, and if it does, this can be
easily fixed by adding comments.
On Wed, Feb 6, 2013 at 9:34 PM, Manuel Klimek <klimek at google.com> wrote:
> On Wed, Feb 6, 2013 at 8:50 PM, Sean Silva <silvas at purdue.edu> wrote:
>> > Optionally derive formatting information from the input file.
>> A more sophisticated extension of this might be the solution to the
>> "StringSwitch" issue.
>> However, going down that road has the disadvantage that it means that
>> the output depends on the formatting of the input, which loses (to
>> some extent) the "canonicality" property of the formatting. (Has this
>> been discussed elsewhere?).
> Yes, this comes up every time one argues with C++ devs :)
> There are multiple issues at play here:
> - this change only detects configuration options, it doesn't actually
> change the behavior depending on how code was formatted before in a
> non-canonical way
> - we already configure code according to the previous whitespaces -
> obviously macros need this, but we also derive where comments belong to by
> looking at whitespace around the comment
> - applying "don't touch" to StringSwitch is a pretty strong example for
> the other end of the spectrum, and I'd strongly vote against doing this for
> as long as possible ;)
>> -- Sean Silva
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits