3 ms·
gofmt was certainly a huge inspiration here, and many of us are jealous that go had it so early in their evolution. Not sure why it wasn't included!
by steveklabnik 8y ago
gofmt was certainly a huge inspiration here, and many of us are jealous that go had it so early in their evolution. Not sure why it wasn't included!
- vanderZwan 8y agoSeriously though, the Go core team has been saying from the start that even they were surprised how big of a positive impact gofmt had. It reduces bikeshedding and makes it easier for people to read each other's code because you learn to read the same basic structure fluently and quickly. It's a basic IxD lesson about software tooling that I think more languages should pick up on. Personally, I think I miss gofmt-on-save more than any other feature when I write other languages (gofmt is a lot more robust than autoformatters in most other languages). Being able to type carelessly and quickly and know the output will be corrected as soon as I hit CTRL+S lets me focus on putting my thoughts on the screen. And it even works as a soft-compiler: if the autoformatter breaks it means I have a bug somewhere.
- dan_quixote 8y ago> It reduces bikeshedding My team works in equal parts go, ruby and javascript. Code review for go code is SO much easier. And it's mostly thanks to gofmt. It still amazes me how fervently some will argue about a single line of white-space or an optional semi-colon...
- renox 8y agoGolang, perhaps it is good I don't know but clang format sucks: it improves slightly normal code but the price is too high as sometimes it totally butcher code making it unreadable. Macro+lambda expression makes code formatters generates ugly things (I don't know what clion use to parse code but it also goes nut thinking wrongly that some code is unreachable..)