3 ms·
I mostly follow K&R style but if the condition of an if or while spans multiple lines, I will put the opening brace on the following line. In nearly all langua
by opk 5y ago
I mostly follow K&R style but if the condition of an if or while spans multiple lines, I will put the opening brace on the following line.
In nearly all languages, I tend to find double indentation for continuation lines works best to keep continuation separate from nested structures. My biggest hate is code where continuation lines are variable because they've been lined up with the position following the first opening parenthesis on the first line - yuk.
Keeping things compact vertically allows more code to fit in a window. Double blank lines and single blanks between nearly every line of code also annoy me.