Re: [PATCH] strbuf.h: format according to coding guidelines
- From
Jeff King <peff@peff.net>
- Date
- Sep 29, 2018, 07:38 UTC
- Message-ID
- <20180929073827.GD2174@sigill.intra.peff.net>
- In-Reply-To
- <xmqqin2pbcwh.fsf@gitster-ct.c.googlers.com>
On Fri, Sep 28, 2018 at 01:11:26PM -0700, Junio C Hamano wrote:
Show 15 quoted lines
> > I am mildly against giving names to obvious ones. > > Just to make sure nobody listening from sidelines do not > misunderstand, ones like getwholeline_fd() that takes more than one > parameter with the same time is a prime example of a function that > take non-obvious parameters that MUST be named. > > What I am mildly against is the rule that says "name ALL > parameters". I tend to think these names make headers harder to > read, and prefer to keep them to the minimum. > > I actually do not mind the rule to be more like > > * Use the same parameter names used in the function declaration when > the description in the API documentation refers the parameter.
Yes, I agree very much with that rule (and your genera line of thinking).
I am not personally against just naming every parameter, but I simply don't care either way.
-Peff