13 ms·
I'll use blank lines if there is nothing else, but I tend to find that when you need to use blank lines to delineate function that a refactoring is in order. T
by fleitz 16y ago
I'll use blank lines if there is nothing else, but I tend to find that when you need to use blank lines to delineate function that a refactoring is in order.
The example
for (int i; i < 10; ++i)
{
if (i % 3 == 0) continue;
array[i] += 2;
}
Could be rewritten as:
for (int i; i < 10; ++i)
{
if (i % 3 != 0){
array[i] += 2;
}
}
- lucisferre 16y agoThat's not really a refactoring improvement. Same number of lines and one more level of nesting. I mean in that particular example it doesn't hurt either way much, but that is the problem with that example.