So let's try that. Start with -rename-, and redesign it to
cope with more general cases. Adding a bunch of options,
like those of -renvars- or something similar, is not a big
deal. It's designing what comes before the comma which is
the key detail.
The implementation I'll optimistically assign
to StataCorp, as this really should _not_ be an .ado. It
should be part of the executable. The existing syntax
(which I'll call Syntax 1) is
Syntax 1: . rename oldname newname
(and for compatibility we really must keep that) and
it could generalise to
Syntax 2: . rename oldname1 [oldname2 [oldname3 ... ]]
newname1 [newname2 [newname3 ... ]]
or
Syntax 2:. rename oldvarlist newvarlist
or to
Syntax 2': . rename oldname1 newname1 [oldname2 newname2
[ oldname3 newname3 ... ]]
Both of those collapse to the existing syntax.
For what it's worth, I prefer Syntax 2', because, that way, it is clear
which oldname is to be replaced with which newname. That is why I used
(essentially) Syntax 2' in the -rename()- options of -descsave-, -parmest-
and -parmby- (available either on SSC or on my website as specified in my
signature). However, if you use Syntax 2', then it is probably a good idea
to include a diagnostic in the case of an odd number of names, such as