From: Adam Spiers Date: Sun, 06 Jan 2013 20:52:08 GMT Subject: Re: [PATCH] api-allocation-growing.txt: encourage better variable naming Message-ID: <20130106205207.GA6552@pacific.linksys.moosehall> In-Reply-To: <7v38yenjgy.fsf@alter.siamese.dyndns.org> On Sun, Jan 06, 2013 at 12:29:33PM -0800, Junio C Hamano wrote: > Adam Spiers writes: > > > The documentation for the ALLOC_GROW API implicitly encouraged > > developers to use "ary" as the variable name for the array which is > > dynamically grown. However "ary" is an unusual abbreviation hardly > > used anywhere else in the source tree, and it is also better to name > > variables based on their contents not on their type. > > Sounds good. To follow "not type but contents", a further rewrite > with s/array/item/ is even better, no? > > I can obviously squash it in without resending, if you agree, or you > can point out why item[] is not a good idea and array[] is better. I agree.