Hacker News new | ask | show | jobs
by TheDong 2439 days ago
People disagreeing is even more the reason to standardize for things that matter to the broad ecosystem.

For example, no one likes gofmt (tabs, eww), but everyone likes code across packages looking the same. And so we use it.

2 comments

Speak for yourself, Go is a bastion of formatting sanity for me cause they chose (correctly) to use tabs. Tabs for indentation are the obvious choice to improve code readability and accessibility for people that want different indent sizes. I don't need it (usually), but I've met people that prefer everything from 2, 4 or 8 spaces, and have heard of people wanting everything from 1 to 8. It also handles far more sanely then spaces for people using proportional fonts instead of monospace, another common readability/accessibility tweak.
and gofmt existed before go really had a large community. It's also a very different problem because you can change formatting decisions from one version to another (and they do!), but API's are difficult to change.