Spaces vs tabs

Where do people that use the tab key, but have the editor setup to convert tabs to spaces fall?

Are they tab people or spaces people?

I’d say they’re “lazy spacers”. They want spaces in their code, but too lazy to hit the space bar the multiple times.

Or possibly “closet spacers”. They have appearance of being a tab user, but secretly use spaces.

They’re ‘Tab People’ that want consistency across IDEs!

“Guilty pleasure tabbers” - they use tabs because it’s so satisfying and really the correct way to do things :wink: but want to look cool and edgy in front of their JS/Python friends.

Also, just going to leave this here to fan the flames…

1 Like

I use tabs for the consistency (and efficiency). Why press space 20 times when I can hit tab twice?

If your editor is converting your tabs to spaces, then no reason. If your editor is storing the tabs in the file and other users have different tab stops, your pretty file ends up unreadable.

Spaces are for considerate people. :grinning:

So youy’re saying you exclusively use the space key, and change the number of spaces you indent to match the existing code (when modifying someone else’s)?

And may I remind you, that you are under oath …

I use Code Editors that auto indent - with spaces! :grinning: (Visual Studio, Vs Code, and Sublime Text all do this).

But if I’m creating a new indent, I used the space key. Ultimately, I’ll use a code-prettier to make it look nice. C# isn’t Python after all… :wink:

1 Like

Even if they have different tab spacing, why would it matter?
One sees:

void bool Test()
{
  bool ret = true;
  if(ret)
  {
     ret  = !ret;
  }
  return ret;
}

Another sees:

void bool Test()
{
      bool ret = true;
      if(ret)
      {
         ret  = !ret;
      }
    return ret;
}

And no tabs set would see:

void bool Test()
{
bool ret = true;
if(ret)
{
ret  = !ret;
}
return ret;
}

image

2 Likes

And let’s not get into line endings…

image

For

void bool Test() { bool ret = true; if(ret) { ret = !ret; } return ret; }

careful guys!!