John Carmack:“freedom to have your own style” in languages is counterproductive
twitter.com
twitter.com
Otherwise, decide on a style and let the automatic formatter enforce it. The tools and IDEs are so good you can literally format each time you hit enter.
> Python brings new meaning to 'off by one errors' by offering 'off by one' indentation errors. (EDIT: quoting a tweet on that thread)
Imagine a long chunk of procedural code. Simple but tedious automated munging. "If conditional" codepaths depending on whitespace/indentation makes diffs very hard to read and codepaths harder to keep track of. Similarly no way to mark off logical blocks other than with comments.
For any code longer than half a screenful, indentation based semantics is very unpleasant.
I’ll even go a little farther and say that python has a bunch of warts for anything beyond beginner programming (and of course many nice parts too).
But all of that is somewhat tangential to “freedom to have your own style”. I like standardization, auto-formatting, etc. I just wish there was better syntax for encoding structure.
Wouldn’t this be the case in other languages too? Especially if you’re using an auto formatter
Eg: When removing a bunch of lines from an indented python block (with empty lines above and below), you might accidentally un-indent later lines and never realize, or at least forget what was the "correct" indentation! Particularly cases where editors mess up indentation level when you delete part of a line.