3 ms·
golang puts semicolons behind the scenes anyway, resulting in bizarre behaviors like not being able to write braces that follow "if" or "for" on separate lines.
by apta 7y ago
golang puts semicolons behind the scenes anyway, resulting in bizarre behaviors like not being able to write braces that follow "if" or "for" on separate lines.
- lazyjones 7y agoIt's not "bizarre", just a tradeoff explained here: https://golang.org/doc/faq#semicolons https://golang.org/doc/faq#semicolons If they thought it mattered much, they'd change it... But since the code should be formatted correctly always, it's not necessary.