Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v2 12/12] refs: move the remaining ref module declarations to refs.h

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:05:25

Michael Haggerty [off-list ref] writes:
Finally, when I'm inventing new functions (which I admit isn't the case
here), I usually write the declaration first and then copy-paste it to
the C file as the first step in writing the definition. If I name the
parameters in the declaration then (a) I don't have to go back and edit
them at the definition and (b) if parameter names are needed later at
the declaration (e.g., for a docstring), I don't have to edit the
declaration again, cross-referencing back to the C file to make sure I
name them consistently.
That cuts both ways, though.  After somebody decides to rename
parameters that used to be "ref" after adding tons of other
functions and names parameters to these new functions "refname", you
have two places to update "ref" to "refname" for existing ones, not
one.
I will split the "add names in declarations" changes into a separate
patch.
Yeah, please do so.  I do not mind "add docstring and add names in
declarations so that docstring can refer to them" patch at all, but
that is a step separate from the "move the remaining declarations".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help