3 ms·
Your post adds nothing useful to the discussion. There is no point arguing about indenting style in a 7 line program, it's needless pedantry! This is almost exa
by JackdawX 14y ago
Your post adds nothing useful to the discussion. There is no point arguing about indenting style in a 7 line program, it's needless pedantry! This is almost exactly the same thing as grammar nazi-ism, and seems to have a similarly negative impact coding related websites.
I think we need to coin a new term - indent-nazi, style-nazi, or something similar - for the purpose of dismissing this kind of post and keeping people on topic.
- swdunlop 14y agoActually, "indent-nazism" is a big thing in the Go community. The Gofmt utility, which takes an AST of your code and normalizes it to a common style. Nobody agrees that the style is perfect, a lot of people have religious preferences when it comes to brace placement. But Gofmt ensures that all these people can find a consistent format when it comes time to diff. GoSublime and go.vim both integrate gofmt into the editor; you start to miss it when refactoring, because you can just shrug and say "gofmt will clean it up when I save" when you move a block to a different function or indent level. I agree with the grandparent -- seeing non-gofmt code is jarring and deliberately distracting. It's like someone writing an entire Python program with nothing but lambdas.
- drivebyacct2 14y agoIt's not just diffs, you learn to scan code. The same way that you can't use i++ inline, having consistent indentation and treatment of syntax allows for quicker at-a-glance human parsing.
- AncientPC 14y agoThe author's style is not idiomatic for C or Go. He uses shortcuts for compactness at the cost of readability. Normally this alone is not an issue, but using non-idiomatic code is a weak argument when trying to describe language readability differences.
- plorkyeran 14y agoThat code is along the lines of #define true false for reader-hostility. When the formatting makes the code look like it does the exact opposite of what it does, then complaining about it is not in any way "needless pedantry".
- ralph 14y agoI'd just point out that I'm not complaining about something trivial, e.g. open braces on their own line, or a matter of taste, but something fundamentally weird, unexpected, and almost designed to mislead.
- ralph 14y agoI'd just point out that I'm not complaining about something trivial, e.g. open braces on their own line, or a matter of taste, but something fundamentally weird, unexpected, and almost designed to mislead.