3 ms·
I'm one of those dinosaurs who prefer 80 character limit, thank you. I have a 24-inch monitor, and I like seeing three different files, a terminal output, and
by yongjik 8y ago
I'm one of those dinosaurs who prefer 80 character limit, thank you. I have a 24-inch monitor, and I like seeing three different files, a terminal output, and a stackoverflow page on Chrome, preferably at the same time.
Regarding variable names, it's a matter of taste, but for example:
NumberOfDocumentsProcessed += MaybeFindUpdatedDocuments(ClientPool->GetClient(NextClientIndex++));
n_docs += find_updated_docs(cli_pool->get(next_cli_idx++));
I find the second line much more pleasant to read, especially if these variable names repeat several times in a function, which they usually do. The problem with long lines is that the style inevitably drifts toward the first example, because nobody can say no to "Can we make the names more descriptive?" With 80-character limit there's a certain friction that acts as a counterbalance.