Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Conversation

jeremytregunna
Copy link

What's far more important than enforcing one spacing rule over another (tabs or spaces) is that the whole file is consistent in its spacing, not that one religiously enforces a particular variety.

This is my explanation and rationale. Code samples should be self-explanitory and wouldn't add anything at all (whitespace are notoriously difficult to compare on screen).

EDIT: Should also note that this speaks directly to Goal number 4.

@kiliankoe
Copy link

Consistent spacing is obviously a goal, but since the Xcode default is tabs anyway, it's easy to use this as a default for any Swift code. Otherwise both spaces and tabs might become somewhat popular and whilst staying consistent for a file you're going to have to mix and match across projects and continuously change editor settings.

@jeremytregunna
Copy link
Author

That's interesting, I have noticed this before, that Xcode tries (sometimes fails) to match whatever is above it. It's not always tabs, it's sometimes spaces. Seems like this could muddy the waters no matter which way is determined.

@joshaber
Copy link
Contributor

We were just talking internally about the goals of this document.

IMO, it reflects our (GitHub's) style. And in our case we do prefer tabs over spaces. @github/objective-c Anyone else have Opinions®?

@robrix
Copy link
Contributor

robrix commented Nov 25, 2014

I tend to concur that this is GitHub‘s style guide & GitHub’s style is as stated: tabs, not spaces.

@joshaber
Copy link
Contributor

🆒

I'ma go ahead and close this then, but thanks for starting the discussion @jeremytregunna!

@joshaber joshaber closed this Nov 25, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants