3 ms·
Python Affected My C/C++ Brace Style (2011)
- iab 5y agoI have similar feelings (particularly with meta-points 1&2). K&R also just seems more compact, which wasn’t something I used to prioritize, but appreciate now.
- opk 5y agoI 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.