DEV Community

Discussion on: Tabs vs. Spaces

Collapse
 
sam_ferree profile image
Sam Ferree

Most importantly, consistency matters more than anything else... Consistent with your team, the languages requirements, style guides, all of these things need consideration. That being said, tabs. The answer is clearly tabs.

tabs is the indent character, and it creates smaller file sizes.

But it could look different on other peoples machines!

Exactly, you should respect other people's preferences of logical indentation. I could use my preferred indent of 2, and other people, godless swine that they are can have 8 if they want...

But how do I?

public int add(int a,
               int b,
               int c)
{
  //And get this to line up?
}

Well you just...

public int add(
  int a,
  int b,
  int c)
{

}
Collapse
 
ihesiulor profile image
. --. ..- ... ..

would make for a good discuss in future tho....