3 ms·
I believe the best answer is dependent on context. How short is too short? How large is too large? On a shallow for-loop, i and j as variable names is perfect
by cassianoleal 5y ago
I believe the best answer is dependent on context.
How short is too short? How large is too large?
On a shallow for-loop, i and j as variable names is perfectly acceptable and probably desirable - it conveys their meaning in a very concise and familiar manner.
On the other hand, if you're writing a function that's a little outside of your codebase's core areas it might make sense to name things a bit more verbosely and perhaps (the horror) add comments explaining in more detail what those data containers are supposed to hold.