2 ms·
It's mostly a matter of personal taste IMHO, has nothing to do with being C or C++, much like brace- or tab-style. My own rule of thumb is: short names for 'un
by flohofwoe 8y ago
It's mostly a matter of personal taste IMHO, has nothing to do with being C or C++, much like brace- or tab-style.
My own rule of thumb is: short names for 'unimportant' variables where the meaning is clear from the context. More descriptive names for the more non-obvious cases, but still keep it short and concise (e.g. I would typically use "pos" instead of "position").
Having said that, some early C dialects limited the significant number of characters in identifiers to 6 or 8. I heard that this is the reason why the C runtime library function names are short (like strcpy() instead of string_copy()).