git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH Outreachy 1/2] format: create pretty.h file

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 10, 2017, 22:36 UTC
Message-ID
<xmqq8tea5hxi.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171210145354.GA20367@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> On Fri, Dec 08, 2017 at 09:40:09AM -0800, Junio C Hamano wrote:
>
>> I see you've "standardized" to drop "extern" from the declarations
>> in the header; I have an impression that our preference however is
>> to go in the other direction.
>
> Can we revisit that?
>
> I haven't see any compelling reason to include the "extern" in a
> declaration. And all things being equal, I'd prefer the thing that makes
> the source code shorter, and is one less thing for authors to remember
> to do.

Surely, but there is no point revisiting. I simply misremembered what we did at around 1354c9b2 ("refs: remove unnecessary "extern" keywords", 2016-03-31).

As long as we know which way we are standardizing, I personally do not have strong preference either way. I appreciate shorter-to-type (i.e. missing "extern") but I also appreciate the more familiar and logical declaration in a header file that indicates something exists somewhere (i.e. explicit "extern") ;-).

Thanks.
Previous: Jeff KingNext: Оля Тележная
Message 6 of 14 in “format: create pretty.h file”
  1. 1/2 format: create pretty.h fileOlga Telezhnaya, Dec 8, 2017
  2. 2/2 format: create docs for pretty.hOlga Telezhnaya, Dec 8, 2017
  3. Eric SunshineDec 8, 2017
  4. Junio C HamanoDec 8, 2017
  5. Jeff KingDec 10, 2017
  6. Junio C HamanoDec 10, 2017
  7. Оля ТележнаяDec 11, 2017
  8. Junio C HamanoDec 11, 2017
  9. Eric SunshineDec 8, 2017
  10. Junio C HamanoDec 8, 2017
  11. Оля ТележнаяDec 9, 2017
  12. 1/2 format: create pretty.h fileOlga Telezhnaya, Dec 12, 2017
  13. 2/2 format: create docs for pretty.hOlga Telezhnaya, Dec 12, 2017
  14. Junio C HamanoDec 12, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.