3 ms·
If the function is called scan_hosts, then if the parameter is n, it's more or less obvious to me that n it's number of hosts to scan. I'm willing to read a bl
by kazinator 8y ago
If the function is called scan_hosts, then if the parameter is n, it's more or less obvious to me that n it's number of hosts to scan. I'm willing to read a block comment to remind me what n is.
- pauljurczak 8y agonHosts according to a popular naming standard and using camel case.
- 0db532a0 8y agoSome issues could be: 1. It is not obvious to everyone. 2. Another integral parameter called k is added later on. Now which is which? 3. Another guy might call all his integral parameters k. n and k are used for the same thing all over the code-base. An outsider might initially think they are different. 4. Names which are descriptive of their use are obvious to everyone by definition.
- yellowapple 8y agoIt may not be obvious to strictly everyone, but that should be reasonably obvious to anyone with enough context to have any business touching that code.