Re: [PATCH 04/26] diff.c: introduce emit_diff_symbol
- From
Stefan Beller <sbeller@google.com>
- Date
- Jun 21, 2017, 21:51 UTC
- Message-ID
- <CAGZ79kbvYBR2M1BRxUPx_e0m8h0TFLx+D44Ueh4XZ6bRMhr7qg@mail.gmail.com>
- In-Reply-To
- <xmqqtw39m2y6.fsf@gitster.mtv.corp.google.com>
On Wed, Jun 21, 2017 at 2:43 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 23 quoted lines
> Stefan Beller <sbeller@google.com> writes: > >>>> I looked through out code base and for enums this is >>>> actually strictly enforced, so I guess I have to play >>>> by the rules here as I do not want to be the first >>>> to deviate from an upheld standard. >>> >>> You sound like you are trying to find an excuse "not to play by the >>> rules". Don't. >> >> When the rules are not yielding best results, adapting the rules >> should be considered. > > I do not think anybody is saying that it is unreasonable to have a > wish that it would be wonderful if we could use C99 features. > > Trailing comma at the end of enum is the least interesting addition > (it is a fix for a previous editions' brown-paper-bag mistake). I'd > be delighted if we can drop support for older compilers and start > using designated initializers, for example. > > Finding other's violation of the current coding guideline is *not* > the right way to promote for that future, however.
In practice it is, though.
Due to the nature of this project we cannot obtain a world view of our users (and compilers used), such that it is impossible to say when the last usage with a strict C89 happens.
If however there is code violating the C89 style for a long enough time and nobody speaks up, we can assume we can safely upgrade to C99.
To do this in a controlled (ideal) way, we would have a single location in the code where we'd use a new desired feature from C99, such that a "rollback" to strict C89 is easy either by reverting to the old style or even just reverting a commit as the occurrence was in a dummy file.
By violating the style guide in more than just one place this is cumbersome and should not be done, which is why I said I will not do it in this series.
Thanks, Stefan