17
rahul
8y

Devs choosing Spaces over Tabs

Comments
  • 7
    I'm a convert, I work with many proprietary ide's both plc and regular. Spaces make sense
  • 0
    Indeed, i'm not sure why anyone would choose tabs over spaces, so much inconsistency....

    Edit!
    @rahul This has bothered me more than it should, can you explain why you prefer to use tabs over spaces?

    This isn't meant to be offensive, i'm merely curious.
  • 2
    @hadouken according to me chances of misalignment is very high when using spaces compared to Tabs in heavily nested code.
  • 3
    @rahul will not happen if you set tab key to insert two spaces (or four or whatever the coding standard says). Then you just tab and get intendenting correct with spaces
  • 11
    Because why press the space bar multiple times and potentially hit it once too many or not enough times? Tabs are quicker and neater you animals. Think of the children.
  • 2
    @Jase code alignment I work with Siemens, beckhoff and Rockwell PLC's each environment is different but I like my code to look the same.

    I also do windows Dev with c#( I grew up with vb) and this was predominantly tab based.

    Now my OCD wants everything laid out the same so I use spaces. It personal preference. I agree tabs are quicker with indentation and help prevent errors with alignment.
  • 12
    @drRoss We DON'T use the spacebar to indent spaces, we use the tab key. Most editors will convert tabs into spaces and you can set your tab stop to be whatever you prefer, ie. 2 or 4 spaces.
  • 0
    @qwerty1337 I am for Tabs 😂😂😂
  • 4
    Spaces that look like tabs inputted by the tab key that inserts spaces that loook like tabs inputted by...
  • 2
    Tabs for indentation, space for alignment. And whoever looks at the code chooses the tab size most comfortable for their eyes.
  • 1
    Tab saves 4 spaces. 🙅🙅
  • 0
    gotta add here. if there are tabs for indentation and your tab width is 2, then a colleague edits the file with tab width 4 and converting it to spaces, it will look good in his ide, but when i open the file it's a full mess.

    hence spaces > tabs
  • 0
  • 1
    I don't get it. Why to hit spacebar multiple times if you can just tab once... ?

    Less keyboard input, exactly 4 spaces, minimal probability to press to much or to many like doing it with spacebar.

    Enlighten me please!
  • 0
    I want the tab key to input four spaces. A single space is a unit of white space, I don't want compound units of white space to be treated as one new unit, I want one or more units of the same measure of white space.

    I accept the tab key, I don't accept the tab unit.
  • 3
    @minimalBot EVERY editor worth it's salt will insert the required number of spaces when you hit the tab key so there is NO difference in coding time between the choices. IMO it's just a question of what you want to happen when someone else opens your code and has a different tab width set.
Add Comment