TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

400k GitHub Repositories: Spaces or Tabs?

21 pointsby ironchiefover 8 years ago

8 comments

greenyodaover 8 years ago
Previous discussion: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12397246" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12397246</a>
gramakriover 8 years ago
Would be interesting to see a statistic on 2 spaces vs 4 spaces as well. Somehow, I can never get used to 2 spaces, the code feels too cluttered. This applies to json&#x2F;html&#x2F;xml as well.
teacurranover 8 years ago
I imagine a lot of the stats are based on tooling defaults. For Java we have a corporate standard to use tabs but most developers aren&#x27;t even aware of their indents. Eclipse defaults to spaces so thats what ends up in a lot of code.
catskul2over 8 years ago
I&#x27;ve found that a lot of developers I talk to prefer tabs (for indenting only) but go with spaces when they start a new project because they feel like it&#x27;s less contentious for some reason.
phantom_oracleover 8 years ago
Am I seeing something totally incorrect?<p>It says:<p>py | files&#x2F;tabs = 27,525 | files&#x2F;spaces = 589,917<p>How is this possible?
评论 #12401857 未加载
dashoffsetover 8 years ago
Interesting how Ruby has almost no code indented with tabs, while Go has almost no code indented with spaces (I believe this is due to gofmt, but I might be wrong).
评论 #12401316 未加载
Davieyover 8 years ago
Repost <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12397246" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12397246</a>
gkanapathyover 8 years ago
Hmm, but how many .vimrcs have<p>set shiftwidth=4 softtabstop=4 expandtab
评论 #12401807 未加载