From: Junio C Hamano Date: Wed, 09 Mar 2016 23:27:14 GMT Subject: Re: [RFC/PATCH 01/48] builtin/apply: avoid parameter shadowing 'p_value' global Message-ID: In-Reply-To: <1457545756-20616-2-git-send-email-chriscool@tuxfamily.org> Christian Couder writes: > Signed-off-by: Christian Couder > --- > builtin/apply.c | 24 ++++++++++++------------ > 1 file changed, 12 insertions(+), 12 deletions(-) To be honest, I have to say that I do not like this change from readability's point of view. Once the global p_value becomes a field in a "apply state" structure, functions will get a pointer to the struct as a parameter, reference to it would be spelled as "astate->p_value", while a local variable or a parameter would be "p_value" and there is no shadowing issue. Also, you wouldn't be able to catch a misconversion in this patch only from the patch text, if the conversion is done this way, would you? The patch may change the parameter p_value to p_v, and change two references to p_value also to p_v, but it may leave another reference to p_value that originally referred to the parameter as-is, making it refer to the global, which would be a new bug introduced by this conversion patch, but that remaining reference would not show up in the patch.