Hacker News new | ask | show | jobs
by cpuguy83 2441 days ago
You can't standardize until people agree. The trivial part isn't the code it's what is acceptable to everyone.

If people don't agree then it by definition does not belong in the stdlib.

2 comments

*the hard part isn't the code

I guess I finished that sentence in a different way than I started it.

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.

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.