5 ms·
I agree higher level names are far more important. But I think clarity at the local level is nice, too. Let's say your function takes a name, sanitizes it, an
by jonahx 11y ago
I agree higher level names are far more important.
But I think clarity at the local level is nice, too. Let's say your function takes a name, sanitizes it, and then does some other processing, perhaps storing it. I think this makes the code more immediately clear than 2 character names:
function storeName(name) {
safeName = sanitize(name);
// do other stuff that works with safeName
//...
}
- MichaelGG 11y agoIn that case it's better to rebind name instead of introducing a new binding - it makes it impossible to misuse it. I hate languages that don't let me rebind (or sometimes, not even shadow).