3 ms·
I like to avoid naming things in my programs to avoid baking in those sorts of assumptions. In short functions that can be as simple as choosing a name like "_
by hansvm 4y ago
I like to avoid naming things in my programs to avoid baking in those sorts of assumptions.
In short functions that can be as simple as choosing a name like "_", "x", or "rtn" to indicate to future me that the thing being described isn't super well defined and is only useful insofar as it lets the containing scope do what it's supposed to.
In slightly longer sections of code I'll often just reference registers or memory offsets directly. You need some kind of identifier to access whatever it is you're working with, but if the name isn't pinned down well by English you might as well just pick your favorite number for the task.
Names are important in places, but only if they aid understanding of the code rather than (intentionally or not) subverting the reader from details that do actually matter.