Live data from Hacker News

Gofmt No Longer Allows Spaces. Tabs Only

code.google.com

1–10 of 57 posts

Re: Gofmt No Longer Allows Spaces. Tabs Only

#3
Who 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

#4

Who 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.

Unsure if trolling or not. It's quite easy to have your editor represent a tab character as "n spaces" - where n is the number of spaces you find pleasing. In fact, I can't recall a serious editor where this isn't the case.

What issues have you seen with regards to using tabs?

Re: Gofmt No Longer Allows Spaces. Tabs Only

#7

Who 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.

Unsure if trolling or not. It's quite easy to have your editor represent a tab character as "n spaces" - where n is the number of spaces you find pleasing. In fact, I can't recall a serious editor where this isn't the case. What issues have you seen with regards to using tabs?

Often different editors on a project (hell, even between computers for the same user) may display the same file different ways, and you almost always end up with weird mixes of spaces/tabs when indenting things (especially if you're super picky like I can be and really, really care about things lining up).

Simply having the editor expand tabs (to whatever people agreed on, usually 4 for C/C++ that I've seen) and save spaces, always, makes life simpler.

EDIT:

See Grandpa Zawinski's post on same: http://www.jwz.org/doc/tabs-vs-spaces.html

Re: Gofmt No Longer Allows Spaces. Tabs Only

#9

Who 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.

This is a huge speculation based only on personal observations, but I'd guess people who got started coding in editors where a space was only a space, so I could indent with one keystroke, tab or with 4+, spaces.

These days I use spaces, because apparently that what is "correct" these days, but I still press tab. Sublime just turns it into spaces and displays the indent as a tab.

Re: Gofmt No Longer Allows Spaces. Tabs Only

#10

Who 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.

Unsure if trolling or not. It's quite easy to have your editor represent a tab character as "n spaces" - where n is the number of spaces you find pleasing. In fact, I can't recall a serious editor where this isn't the case. What issues have you seen with regards to using tabs?

I'm not sure if there's an "issue" with tabs, but I have to agree that I pretty much never come across tabs in any of the languages I use regularly and find it jarring when I do so despite the obvious theoretical benefit of flexible tab widths enabling user preference.

I can't come up with a particularly good reason for it, but I'm so used to spaces at this point that tabs feel very wrong.

If anyone else has a good explanation I'd love to hear it.

Post reply on HN