Re: [PATCH] clean up extern decl of functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

>> Why are we re-introducing an explicit "extern"? Since function decls are
>> extern by default, what do we gain by doing this?
>>
>> You mentioned in the past[0]
>>
>> 	I think there is a push to drop the "extern " from decls of
>> 	functions in *.h header files.
>>
>> so are we reversing that push now?
>
> That is certainly on the table.  Re-read what you quoted and realize
> that I was not expressing my opinion on the "push"; it was just
> stating that other reviewers seem to be in favor.
>
> See my other response why I think the "push"  was a bad idea.

I'd elaborate a bit more.  A proposed update to CodingGuidelines
will be sent separately as a follow-up to this message.

"Are we reversing that push now?"  That is not a question I can
unilaterally answer yes/no---I do not run dictatorship where I
cannot survive without telling all the contributors how to cross
their t's and dot their i's.  There are things in our coding
guidelines that tells me to do something differently from how I
would, but I can adjust and survive if the primary benefit of having
guidelines, i.e. making things uniform one way or the other, is net
win.  When a guideline turns out to be a bad idea, however, I can
propose to change it.  So can you or anybody else ;-)

In that message, I just told Emily that there is a push to omit
extern, in the sense that it was the opinion of the prevailing
louder voices.  Back then, I didn't have an opinion strong enough to
favor either way myself, and I was willing to go with the majority
if many contributors wanted to drop "extern" in the hope that it
will result in quality code.

But with the Makefile patch you posted with Dscho's review this
morning, it has become apparent to me that it wasn't a great idea
after all.  It caused you to spend your time to write the RFC patch
and come up with the regexp, and caused the project to spend
reviewer bandwidth on the patch.

Of course, how you spend your time is entirely up to you.  But if
you are going to contribute your time on this project, the project
appreciates if the time is spent on things that make the codebase
better.  And to me, unlike to me "in the past[0]", it is reasonably
clear that the push of omitting "extern" ended up wasting resources
without doing much good for the project.

Seeing that the pattern that were trying to be careful didn't catch
the decls fixed by the patch you were responding to in this thread
did not help improve my impression on the idea of omitting "extern".

I think these two decls I touched in this patch were left behind
when somebody, possibly you in b199d714 (*.[ch]: remove extern from
function declarations using sed, 2019-04-29), tried to "clean up"
the last time, because the pattern used in the conversion did not
catch it.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux