News for hackers. Stuff that matters.
Re:Why are my Go executable files so large? by CamperBob2 on Sunday December 29, 2019 @04:51PM (#21908786)
I installed golang the other day to check it out for the first time. For whatever reason, I chose to input the 'Hello world' program from golang.org by typing it in manually. As with most C/C++ code I would typically write, I put the brackets on their own lines.

Welp, so much for Go.

Re:Why are my Go executable files so large? by michaelcampbell on Sunday December 29, 2019 @05:24PM (#21909004)
Like all opinionated formatters, you adjust to it, or you don't. I don't hate gofmt, other than tabs. Sweet jesus.
Re:Why are my Go executable files so large? by CamperBob2 on Sunday December 29, 2019 @10:40PM (#21910643)
It's not about the brace format. It's about the mentality that went into the underlying design decision. The more you look into why they did it that way [1], the more dysfunctional their decisionmaking process sounds.

Basically, while (e.g.) Python's mandated formatting style arose from Guido van Rossum's philosophy of best programming practice, Go's mandated style arose from the fact that it was easier to implement from the point of view of compiler authors who had evidently never used a lexer before, much less written one.

[1] https://stackoverflow.com/questions/17153838/why-does-golang...

Re:Why are my Go executable files so large? by omegabravo on Sunday December 29, 2019 @11:41PM (#21910859)
> the more dysfunctional their decisionmaking process sounds.

can you expand, because I can't see their dysfunctional decision making from the link you provided.

Re:Why are my Go executable files so large? by CamperBob2 on Monday December 30, 2019 @12:54AM (#21911127)
The second answer?

"Go uses brace brackets for statement grouping, a syntax familiar to programmers who have worked with any language in the C family. Semicolons, however, are for parsers, not for people, and we wanted to eliminate them as much as possible. To achieve this goal, Go borrows a trick from BCPL: the semicolons that separate statements are in the formal grammar but are injected automatically, without lookahead, by the lexer at the end of any line that could be the end of a statement. This works very well in practice but has the effect that it forces a brace style."

Nothing about that is OK. Nothing about it makes sense.