3 ms·
I see the line of reasoning behind this as explained by various comments here. But why can't this just be an user/editor preference while the file saved may us
by alok-g 15y ago
I see the line of reasoning behind this as explained by various comments here. But why can't this just be an user/editor preference while the file saved may use whatever convention?
- canop_fr 15y agoYou don't read only your code, but also code from other people. Go make it really easy, in my opinion, to fast decipher foreign code, due to shortness, clarity, and conventions. Convention help you recognize in that case the structure of the function without having to make your mind around the habit of the other coder.
- alok-g 15y agoI do not care who wrote the code -- It should be shown to me using my formatting preferences, just as I can use my own visual theme in the editor. Those themes do not affect the code as it is saved into the file, and those formatting preferences should not either.
- JulianMorrison 15y agoFormatting is semantic in Go, newlines are significant, so a brace across a newline is quite reasonably different from a brace on the same line.