Hacker News new | past | comments | ask | show | jobs | submit login

gofmt probably has alone saved so much time across the world (and is upstream from every other language ecosystem basically saying "ok let's just autoformat").

I hate what autoformatters do to my code, but I love not having to talk about spacing anymore.




Interestingly enough, I hate autoformatters (and use spaces instead of tabs) in every other language, but in Go you just get used to the way gofmt formats your code from the beginning, and then start to appreciate that you don't spend as much time on it anymore, so it's not a problem (at least for most people).


I've seen a number of autoformats for other languages be way too obsessive about formatting every little detail and edge case, to the point where it just becomes silly. 100% consistency is a fool's errand, and also contributes very very little Once you deal with some major issues (braces, spacing) you very quickly get diminishing returns.


One thing that I've found works kinda well: if you use a linter with "autofix" options, then the policy can be: complaint about formatting? Add the lint that can be autofixed. Then your formatter is just "run the lint autofixes"




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: