Thread (164 messages) 164 messages, 7 authors, 2021-09-18

Re: [PATCH 4/5] commit-graph: refactor dispatch loop for style

flat view

From: Derrick Stolee <hidden>
Date: 2021-02-16 18:29:25

On 2/16/2021 7:02 AM, Ævar Arnfjörð Bjarmason wrote:
On Tue, Feb 16 2021, Derrick Stolee wrote:
quoted
The other patches solve real readability problems or reorganize the code
to use other concepts within the codebase. This one is much more optional.
What do you think about
https://lore.kernel.org/git/874kidapv7.fsf@evledraar.gmail.com/ (local) ? :)
Using a 'goto' is a fine way to avoid a nesting level, but I'm not sure
it "improves readability." Having the tab level makes it clear that that
code is executed only when some condition is met, in this case "if (argc),"
while with the 'goto' we need to know that execution was redirected.

I don't feel too strongly either way. If the code was presented one way or
the other, I probably wouldn't recommend changing to the other mode. In
that sense, the change isn't necessary and causes me to break the tie in
favor of leaving it where it is.

Of course, if someone else says "I like this and would prefer it be used
as an example for future contributors" then the tie is broken in the other
way.

Thanks,
-Stolee
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help