Anyway, in that case I imagine we'll see a Go preprocessor that takes all the line-initial braces and moves them up a break before sending code to the compiler. People get pretty worked up about this stuff.
Anyway, in that case I imagine we'll see a Go preprocessor that takes all the line-initial braces and moves them up a break before sending code to the compiler. People get pretty worked up about this stuff.
It's Python code and I find it uglier than some fairly large C++ project I used to work on.
Anyway, I wish there was a gofmt in Python because at least, I'd drop all hopes of forging my own rules (silly junkies) and some basic clarity would be forced into our codebase.
I know there are beautifiers but when such things are enforced and not negotiable, it's just so much simpler and people just stop caring as well.
I've always argued that if your team can't bother to even indent code properly than you have much bigger problems than any language formatting rules can solve.
We decided to make our build system run PEP over the code, resulting in a failure if PEP didn't pass.
It annoyed the hell out of him, but we quickly got the formatting up to a better standard.
I strongly believe that code should look like a screenplay, not a novel. More white space, in other words, is rarely a bad thing. Inline braces decrease white space and make unfamiliar code harder to scan, so to me they're Not Good.
Also wow, I didn't know it was even possible to write Python without spaces. Are we talking no spaces in arguments, like
def func(arg1,arg2):
print "Indented"
return
or full-on no spaces? def func(arg1,arg2):
print "Not indented"
return
I thought the latter was prohibited. def func(arg1,arg2):
i=other_stuff(1,2,3,4,56,43,234+4*3)
return i