• by untog on 12/27/2015, 12:23:03 AM

    I don't understand why this is still an issue in 2015. Why can't our source control software take code indented any way, any how, and convert it to your personal preference when you pull the repo? It's not like we enforce what color syntax highlighting you use or what font.

    Honestly, the hours that have been wasted debating tedium like this in programming...

  • by benatkin on 12/27/2015, 12:26:18 AM

    I wonder how many of those with tabs prefer their tab stops to be at something other than multiples of eight spaces. If it's half of them that would be about a sixth of the repositories.

    GitHub has addressed them by supporting .editorconfig. Setting a tab size in .editorconfig changes the tab size for viewing files but not diffs (last I checked, a couple of months ago). If any GitHubber is reading, it would be great for that preference to be used for diffs as well!

    http://editorconfig.org/

  • by SwellJoe on 12/27/2015, 12:42:42 AM

    Anyone know why Ruby is 100% for 2 spaces? That seems impossible. Even Go isn't that consistent and it has gofmt which seemingly everyone uses.

  • by pmiller2 on 12/27/2015, 12:46:10 AM

    I find it interesting that certain languages (F#, Ruby, Scala) are so polarized against tabs. Some make sense, like Haskell, Go, or Python (and, to an extent, CSS), but the rest kind of baffle me.

  • by nikolay on 12/27/2015, 1:03:14 AM

    I prefer leading tabs and spaces for everything else. The fight over tab size is irrelevant in the case where you align with spaces outside of indenting with tabs.

  • by forgotmypassw on 12/27/2015, 12:38:48 AM

    Personally I prefer tabs for indentation and spaces for alignment. Also what's wrong with these charts? They keep shrinking and expanding you can't tell what's going on.

  • by santaclaus on 12/27/2015, 1:49:04 AM

    Three spaces fares horribly in this analysis. I wonder why the aversion for three? Are odd numbers inherently less appealing?

  • by stordoff on 12/27/2015, 12:45:44 AM

    Looking at this just made me realise that IDLE (Python IDE) inserts four spaces instead of tab when you indent using the tab key. I've always used tabs (1 tab = 1 level of indentation) for my personal projects, and only just realised why IDLE's "tabs" seem short by default.

  • by markbnj on 12/27/2015, 12:23:47 AM

    Interesting! I assume tabs being so common in C projects has to do with their use in makefiles. But what is up with Go? Why are tabs used exclusively there? Not a Go programmer so I assume that must reflect something in the language or typical tool chain.

  • by ChuckMcM on 12/27/2015, 12:33:49 AM

    That is a fun analysis, I use 4 space tabs (where hard tabs are in the code, and ts=4 in .vimrc). Hard tabs are essential on proportional font editing systems, otherwise your code goes all over the screen!

  • by smilekzs on 12/27/2015, 12:59:19 AM

    The pie chart would be more readable if the "space count" is directly on the pie slice (instead of tooltip/legend)

  • by awqrre on 12/27/2015, 1:20:04 AM

    Why use such a small selection of repositories? and why does Go seem to use all tabs?

  • by Gedrovits on 12/27/2015, 11:55:17 AM

    I like the Ruby, it really have example "standard".

  • by jehna1 on 12/27/2015, 12:43:11 AM

    Just a side note: why does a website still need to alter my browser's scroll in 2015?

  • by dendory on 12/27/2015, 1:20:06 AM

    I really cringe when dealing with spaces, which is a real problem since I code in Python a lot, which cannot deal with a mix of both. I don't understand people using 2 or 4 spaces at every line, it's so much slower. Sure the first time they probably use a tab and their editor is setup to replace with spaces, but as soon as you go back to edit you need to deal with the multiple spaces.

    I say tabs for all!

  • by Jemaclus on 12/27/2015, 1:05:35 AM

    Tabs for indentation, hands down. Every editor out there worth its salt can adjust the tab size the way you want. If you want 1 tab = 2 spaces, you can do that. If I want 1 tab = 4 spaces, I can do that. Either way, it's one tab, and we're all happy. It's literally a win/win scenario. I have never understood the argument for spaces for indentation, not when tabs are at our disposal.