And what's great; no Go developer will notice.
Gofmt No Longer Allows Spaces. Tabs Only
21–30 of 57 posts
Re: Gofmt No Longer Allows Spaces. Tabs Only
#22Who actually uses tabs instead of spaces? I'm genuinely curious--one of the first things pretty much any project I've ever been involved in has been the setting of tabs characters to become spaces, simply because all text editors are retarded in this regard. This is quite strange.
Re: Gofmt No Longer Allows Spaces. Tabs Only
#23Earlier quoted context omitted.
No, Fitz is not advocating tabs over spaces in coding. He is saying gofmt loses a large part of its purpose if it does not enforce a particular style, and the Go devs happen to prefer tabs. It sounds like he's fine w/ anyone using a tool to format by spaces. That said, this is quite un-newsworthy.
I'd say it's newsworthy to large Go shops that use spaces with gofmt and now have to change indentation in their repos. This isn't insignificant. Also it requires additional flags for things like blame/diff to ignore whitespace changes.
Re: Gofmt No Longer Allows Spaces. Tabs Only
#24Re: Gofmt No Longer Allows Spaces. Tabs Only
#25Earlier quoted context omitted.
Grabbing some Clojure code because it's nearest to hand. Look here: https://github.com/clojure/clojure/blob/master/src/clj/cloju... I want the bindings being declared within that let to line up with one another. the first one immediately follows "(let [" so I need the rest to be indented six characters past where the let was originally indented. Six, not N times whatever the tab width happens to be in whichever edito…
The way people solve that is tabs for indentation and spaces for alignment. In my opinion this is a terrible compromise as mixing tabs and spaces is sacrilegious.
Re: Gofmt No Longer Allows Spaces. Tabs Only
#26Earlier quoted context omitted.
I'd say it's newsworthy to large Go shops that use spaces with gofmt and now have to change indentation in their repos. This isn't insignificant. Also it requires additional flags for things like blame/diff to ignore whitespace changes.
no such large go shops exist.
Re: Gofmt No Longer Allows Spaces. Tabs Only
#27Re: Gofmt No Longer Allows Spaces. Tabs Only
#28Earlier quoted context omitted.
The way people solve that is tabs for indentation and spaces for alignment. In my opinion this is a terrible compromise as mixing tabs and spaces is sacrilegious.
There is nothing wrong with mixing tabs and spaces. It works great.
Re: Gofmt No Longer Allows Spaces. Tabs Only
#29I predict that this change will be reverted in a few months when the Go team realizes that code is read in a lot of different places, most of which never display hard tabs correctly.