News for hackers. Stuff that matters.
Re:Tabs or Spaces? The Top Starred Repositories in GitHub An... by Jemaclus on Saturday December 26, 2015 @08:05PM (#10795969)
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.
Re:Tabs or Spaces? The Top Starred Repositories in GitHub An... by jheriko on Saturday December 26, 2015 @08:11PM (#10795986)
> Every editor out there worth its salt can adjust the tab size the way you want

this is the one strong argument for tabs that i have heard, over and again. it makes a lot of sense.

if this was a real issue i'd fall that side of the argument, since its not i go with the consensus and /prefer/ 4 spaces.

in reality though i end up mixing 4 spaces with tabs based on default editor configurations and i what i end up working with.

it doesn't cause real world problems.

2 spaces is nice if you work in exceptionally backwards command line environments and have no tab character input mechanism (this is not uncommon, although it /is/ stupid imo).

... now a long time ago i did switch from tabs to spaces, the reason was simple, google code and other web based code viewers would use the standard 5 spaces for a tab, so mixed and matched tabs and spaces looked ugly and ascii art in comments would get broken.

i'm not sure thats a real issue any more...

Re:Tabs or Spaces? The Top Starred Repositories in GitHub An... by webo on Saturday December 26, 2015 @08:09PM (#10795977)
You just described spaces for indentation.

A tab is a special ascii character, which most IDE's replace with spaces if you want to (like you described).

Re:Tabs or Spaces? The Top Starred Repositories in GitHub An... by nerdwaller on Saturday December 26, 2015 @08:13PM (#10795994)
I believe you are misunderstanding what they're saying. they are saying you use the special characters and your editor can display it as you please (2char wide or 4char wide). if you literally replace the tab char with N spaces, my editor will now show it as N spaces.
Re:Tabs or Spaces? The Top Starred Repositories in GitHub An... by luikore on Saturday December 26, 2015 @08:29PM (#10796032)
Spaces for the beauty of code

    foo : ( bar )
        | i just want to align this
        | when writing syntax definitions
Re:Tabs or Spaces? The Top Starred Repositories in GitHub An... by Jemaclus on Saturday December 26, 2015 @09:22PM (#10796132)
That's alignment, not indentation. There's a semantic difference there.