Re: Symbol Name Length (Was: STL Memory leak?)
On Apr 8, 6:01 pm, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
Daniel Pitts wrote:
I've seen
coding style docs with the requirement that a variable should always
have at least two letters in its name. I can't write
for (int i = 0; i < somecount; ++i)
and instead have to use 'ii':
for (int ii = 0; ii < somecount; ++ii)
Or "index".
Nobody remembered why it was established. So, common sense
and periodic reviews of the policies are important, too.
The one time I saw that, the motive given was search and
replace. Something like 's/i/j/' in vim or sed is going to wreck
havoc; something like 's/ii/jj/' will probably work.
I pointed out that all of the editing tools we used (vim, emacs,
sed, ed...) supported replacement of complete word only, e.g.
's/\<i\>/j/', and the rule was dropped.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34