Hacker News new | ask | show | jobs
by Tagbert 1270 days ago
conversely, what is the case for single letter names, even in the situations you bring up? Why would someone chose to use single letter names?
1 comments

There are many cases where a single letter variable name is clearest and easiest to read.

My loop iterators are mostly single letter. A coordinate is likely to be an x, y, or z. A unit vector aligned to an axis will be i, j, or k. A point is likely to be p. A vector data structure v. The first transformation of a variable x is likely to be x’, the second x’’, etc.

All these are all math terms and standards which are defined outside of code.

I think there's something to that - if it's a common enough convention they use it. But if not, don't make it up.