3 ms·
> Those aren't in the stdlib. gofmt is. Which also means that you can count on any Go code you find online to be formatted the same way too. It's like PEP 8,
by chimeracoder 14y ago
> Those aren't in the stdlib. gofmt is.
Which also means that you can count on any Go code you find online to be formatted the same way too.
It's like PEP 8, except better, because it's a lot more widely enforced.
- jlgreco 14y agoExactly. What you can reasonably expect from code in the wild makes a world of difference. When I am working on personal projects that I have in C, I use `-Wall -Wextra -Werror -pedantic` (along with the strictest `-std=` that the particular project will allow), and it makes my development experience an order of magnitude more pleasant. However when I am working on C code that is primarily somebody else's, I rarely get the pleasure of expecting code neat enough to allow me to reasonably use those flags. This makes working in C a much less pleasant experience overall. That Go goes further and is strict about style too is just brilliant.