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

Re: [Outreachy] [PATCH] bisect--helper: change `retval` to `res`

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 16, 2019, 19:08 UTC
Message-ID
<xmqqh820jdfd.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20191216111246.5190-1-mirucam@gmail.com>
Miriam Rubio <mirucam@gmail.com> writes:
Show 6 quoted lines
> From: Tanushree Tumane <tanushreetumane@gmail.com>
>
> Convert of variable `retval` to `res` make `bisect--helper.c` 
> more consistent.
>
> Now, 110 ocurrences of `res` in file and zero `retval` occurrences.

And why is this a desirable change, not merely a distracting code churn?

IOW, are there other changes that build on this change that benefits from the fact that the variable that holds the value to be returned is always called "res" after this patch gets applied?

FWIW, I actually think "retval" would be a more appropriate name for the variable that holds the value to be returned than "res", but it is not worth the churn either way---I see this more as "once the code is written one way, it is not worth wasting bits and brain cycles to change it" kind of issue.

Unless there are other valid reasons to do this change, that is.
Thanks.
Previous: Miriam Rubio
Message 2 of 2 in “bisect--helper: change `retval` to `res`”
  1. Miriam RubioDec 16, 2019
  2. Junio C HamanoDec 16, 2019

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.