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

Re: [PATCH] CodingGuidelines: discourage arbitrary suffixes in function names

From
Taylor Blau <me@ttaylorr.com>
Date
Oct 24, 2024, 16:50 UTC
Message-ID
<Zxp6vKxxwKTb+g5q@nand.local>
In-Reply-To
<xmqqr086pbna.fsf@gitster.g>
On Wed, Oct 23, 2024 at 05:50:17PM -0700, Junio C Hamano wrote:
> Surely all of _1(), _helper(), _recursive() are meaningless.  If we
> were to replace existing uses of them, the replacement has to be 10x
> better.

Well put. Each of the three are more or less equally meaningless, but _1() is an accepted (?) project convention and has the fewest characters, so I think is a good choice personally.

Show 5 quoted lines
> Having said all that, as an aspirational goal, I think it is good to
> encourage people to find a name that is descriptive when writing a
> new function.  I'd refrain from judging if it is way too obvious to
> be worth documenting (as I am officially on vacation and shouldn't
> be thinking too much about the project).
Yeah, go back to vacation ;-).

Thanks, Taylor

Previous: Junio C HamanoNext: karthik nayak
Message 8 of 15 in “CodingGuidelines: discourage arbitrary suffixes in function names”
  1. CodingGuidelines: discourage arbitrary suffixes in function namesKarthik Nayak, Oct 21, 2024
  2. Patrick SteinhardtOct 21, 2024
  3. Taylor BlauOct 21, 2024
  4. karthik nayakOct 22, 2024
  5. Taylor BlauOct 22, 2024
  6. karthik nayakOct 23, 2024
  7. Junio C HamanoOct 24, 2024
  8. Taylor BlauOct 24, 2024
  9. karthik nayakOct 22, 2024
  10. Kristoffer HaugsbakkOct 21, 2024
  11. karthik nayakOct 22, 2024
  12. CodingGuidelines: discourage arbitrary suffixes in function namesKarthik Nayak, Oct 23, 2024
  13. Taylor BlauOct 23, 2024
  14. Karthik NayakOct 23, 2024
  15. Justin ToblerOct 23, 2024

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.