|
|
|
|
|
by psunavy03
781 days ago
|
|
Seriously. Python Black is a godsend. I don't have to waste brain cells on formatting minutiae, just right-click and go "format my code, please." It's consistent, it works, and IDGAF about the details. The only formatting that drives me up the wall is people using K&R braces in C# or Java. It's not 1970 anymore, and we're not all typing on green-screen terminals. It's like people fetishizing vim or emacs over modern IDEs. |
|
AFAIK there is no rule in K&R requiring no braces for single-line blocks. In that situation, braces are optional.
The K&R style was hugely influential on Java and many other languages, it has nothing to do with green-screen terminals (I used those, as well as white and amber), it is just a style. I also moved on from vi, and use IntelliJ and Sublime most of the time.
The only difference between K&R braces and Java braces is that they combine lines on if-else. The Java guys did it because it enabled them to fit more code on to overhead slides. Overhead slide projectors predate green-screen terminals BTW...