4 ms·
It does if you use the One True Brace Style: http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS s
by jbert 13y ago
It does if you use the One True Brace Style:
http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS
since your eyes would flag:
if (null != foo); {
bar();
}
as badness.
[edit: correct } to {, ta]
- georgemcbay 13y agoAs someone who programs in Go a lot these days, that line (I assume you meant the first curly to be { and not }) looks less obviously wrong than it would have in the past when I did more C/C++ programming. Because I've gotten used to Go's support for short assignment in an if, the semi doesn't look completely out of place there (though the construction here is not valid Go either).
- fyi80 13y agoFortunatly for Go, `if (1); {}` will not compile.