Thread (34 messages) flat view 34 messages, 2 authors, 2016-06-16

Re: [PATCH 25/29] refs: resolve symbolic refs first

From: David Turner <hidden>
Date: 2016-06-16 02:19:05

On Fri, 2016-04-29 at 11:51 +0200, Michael Haggerty wrote:
On 04/29/2016 01:40 AM, David Turner wrote:
quoted
On Wed, 2016-04-27 at 18:57 +0200, Michael Haggerty wrote:
+retry:
...
quoted
+		if (--attempts_remaining > 0)
+			goto retry;
could this be a loop instead of using gotos?
It certainly could. The goto-vs-loop question was debated on the
mailing
list when I first added very similar code elsewhere (unfortunately
I'm
unable to find a link to that conversation). I was persuaded to
change
my loop into gotos, the argument being that the "retry" case is
exceptional and shouldn't be such a dominant part of the function
structure. Plus the goto code is briefer and feels less awkward to me
in
this case (that's subjective, of course).
It's part of the structure anyway; it's just implicit rather than
explicit. I won't block consensus tho.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help