3 ms·
code should be clear rather than clever But clarity depends on context. Personally, in context of the C language, I find code like while ((string = *env++
by cygx 12y ago
code should be clear rather than clever
But clarity depends on context. Personally, in context of the C language, I find code like
while ((string = *env++))
(which is how the offending loop could have been written as well) perfectly clear. I doubt someone coming from a, say, Java-background would agree.
Similarly, he complains that the loop index was called string_index instead of the 'far superior' i.
With C99, I'd agree. But in a C90 codebase, do you really want to have declarations like
int i,j;
instead of
int char_index, string_index;
at the top of a block?