Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

All the world is not golang.

Go is actually one of the few exceptions in the world due to having had "go fix" baked into the compiler/ecosystem from the start. That makes a huge difference.

It's also quite a simple language and is pretty easy to auto-format reasonably. Few other languages are that easy to auto-format or have that kind of culture where auto-formatting is accepted as a matter of course.



Nit: you probably mean "go fmt".

"go fix" is a different tool. (Though "go fix" does also run the formatter.)


Go is actually extremely hard to format automatically:

http://journal.stuffwithstuff.com/2015/09/08/the-hardest-pro...


That article is about Dart, not Go.


Furthermore, the difficulties it mentions are pretty much universal across languages.


Rust is working on this:

    $ rustup component add rustfmt-preview
    $ cargo fmt


(And rustfix for the “go fix” equivalent.)




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

Search: