3 ms·
Well, there's L1 norms, Lagrange point L1, an L1 visa, etc. In any of those contexts, it's an excellent variable name. There's also the case of short little ut
by deong 10y ago
Well, there's L1 norms, Lagrange point L1, an L1 visa, etc. In any of those contexts, it's an excellent variable name.
There's also the case of short little utilities. For something like strncmp (or at least my slightly naive version), I'd rather see code like
int strncmp(const char* s1, const char* s2, int n)
{
for(; n>0; s1++, s2++, n--) {
if (*s1 < *s2) {
return -1;
} else if (*s1 > *s2) {
return 1;
}
}
return 0;
}
than have code where someone attempted to come up with long "meaningful" names for each variable. There isn't really meaning here beyond "pointer_to_string1" and "pointer_to_string2", and longer names here do nothing but add visual clutter.
- scott_s 10y agoI think l1 is considered uniquely onerous because "l" and "1" render similarly in many fonts. That is, the complaint is not about x1, x2, x3, etc., it's about that specific combination.