From: Jeff King Date: Mon, 12 May 2014 18:13:26 GMT Subject: Re: [PATCH 1/2] inline constant return from error() function Message-ID: <20140512181326.GA31164@sigill.intra.peff.net> In-Reply-To: On Sun, May 11, 2014 at 10:22:03AM -0700, Junio C Hamano wrote: > The alternative you mentioned up-thread "... to write out "return > error(...)" as "error(...); return -1". In some ways that is more > readable, though it is more verbose..." has one more downside you > did not mention, and the approach to encapsulate it inside error() > will not have it: new call-sites to error() do not have to worry > about the issue with this approach. > > Until it breaks, that is. But that goes without saying with the > "it's something we can count on" pre-condition in place ;-). Yeah, I agree with this thinking. I'd rather not do something that impacts each callsite until we have exhausted other options that hide the complexity in the definition. -Peff