Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why spaces instead of tabs? #622

Closed
ibc opened this issue Sep 14, 2016 · 7 comments

Comments

@ibc
Copy link

commented Sep 14, 2016

Sorry, I know this is not an "issue", but I wonder why the "standard" should force me to use spaces instead of tabs for indentation.

When using spaces, I'm forcing every one else to see my code as I like. In certain monitors/resolutions 2 spaces could be a bad choice.

By using tabs, anyone can configure his text editor to display tabs with the desired visual width (for example, 2 or 4 spaces), and we all are happy.

I've been never told about a real advantage of using spaces instead of tabs.

@LinusU

This comment has been minimized.

Copy link
Member

commented Sep 14, 2016

Duplicate of #58

@ibc

This comment has been minimized.

Copy link
Author

commented Sep 14, 2016

#58 is not just closed, but also locked (after just 6 comments). So no debate, right?

It is also so funny how #58 ends:

If you care a lot about tabs vs spaces, standard isn't for you.

I should not care about tabs vs spaces because you authors already did for me, right?

IMHO you should have chosen any other name for this library. This is not the "standard" of anything but the way you authors code, nothing else.

@feross

This comment has been minimized.

Copy link
Member

commented Sep 14, 2016

I'll just leave this here: https://www.youtube.com/watch?v=SsoOG6ZeyUI

You're right that tabs have some benefits. Spaces have some benefits too. The main issue with this topic (and why the previous issue was locked) is that this is not something that the maintainers of standard have any interest in debating. There are plenty of blog posts about why spaces are better than tabs if you want to go hunting for reasons.

You have the whole rest of the internet to debate the merits of spaces vs. tabs. This is not the place, sorry.

@feross feross closed this Sep 14, 2016

@ibc

This comment has been minimized.

Copy link
Author

commented Sep 14, 2016

I already knew that video, so nice :)

OK, I just assume standardjs is not for me, and I respect your decision. Just:

Spaces have some benefits too

That's the only rationale I've found regarding spaces benefits: none (or undefined).

@feross

This comment has been minimized.

Copy link
Member

commented Sep 14, 2016

The reason that standard prefers spaces is simple: The most popular way of indenting JavaScript is with spaces. There are people who have written about why spaces may be better, if you're interested: http://paul-m-jones.com/archives/2312

@ibc

This comment has been minimized.

Copy link
Author

commented Sep 14, 2016

The two arguments in favor of spaces in that post are mainly wrong:

Inter-Line Alignment

Even when I use TAB for indentation, I do NOT use TAB for "inter-line alignment" but spaces. That's not "indentation" but "text decoration".

Line Length Recognition

Well, a problem if (as the post states) someone sets a virtual 8-space!! width for TAB...

@feross

This comment has been minimized.

Copy link
Member

commented Sep 14, 2016

As mentioned before, I'm not interested in debating spaces vs. tabs.

@standard standard locked and limited conversation to collaborators Sep 14, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.