3
GMR516
93d

Why should I use tabs or spaces? Convince me of your side. :)

Comments
  • 3
    Because using carriage returns is just silly.
  • 0
    It really doesnt matter, choose the you feel more confortable with or the one you are forced to use at work. We dont wana start a religious war here :)
  • 3
  • 0
    @FetzenNET what if I like using a mixture of both?
  • 1
    @Michelle okay. :(
  • 1
    Thats a bad idea choose one and Stick with it. Everyone else reading your code is going to hate you >:D
  • 2
    @GMR516
    I'm just kidding lol. xD

    I'm not going to convince you to use either because everyone has their own preferences. You might like tabs or you might like spaces. I personally like tabs, but if you use spaces, that's cool too.
  • 3
    @Michelle Yay, this community really is as nice as they say. Thanks.
  • 2
    @GMR516
    Yeah haha. I was pretending to be stack overflow earlier, but I don't think you got the joke.

    That's okay tho, I could've done it better anyway. :)
  • 0
    Whatever you choose make sure your linting tools support in the commited config file

    This way all the team uses the same convention
  • 3
    Convert tabs to 4 spaces, and use an ide that will treat them has tabs
  • 1
    I think tabs make more sense, but python conventions say spaces and linters annoy you if you do otherwise, and I've heard of studies saying devs that use spaces have better salaries, so I use spaces 😁
  • 0
    @CptFox you’re perpetuating the stereotype. ;)
  • 4
    Tab one press
    Spaces more presses
  • 1
    Spaces, otherwise you will burn in hell.
  • 0
    @ItsNotMyFault that’s the fire I was looking for.
  • 0
    Soft tabs
  • 0
    Space coz I can hit space hard 4 times and it even won't mindπŸ™ƒ
  • 0
    I press the tab key, but I setup ides to convert to spaces.

    This saves me bashing a space bar more then I need too

    When you’re using github or something for code review, everything is formatted nicer then when you actually use tabs.

    Other then that, use what you want to use, there’s no real right or wrong side, or be me and fake the spaces.
  • 0
    @irene They are a unit of indentation, and everyone can set their text editor to display them with whatever width they please. They are a single character, so deletion behaviour doesn't depend on your text editor : one delete = indentation--, even in a poorly configured nano. They are perfectly well handled in any system. There isn't any reason why they would be bad for indentation, and plenty reason why they're better than spaces.

    BUT I'll just use whichever is asked of me by conventions, regardless of that opinion of mine. Since most of what I do now is in python, that means spaces.

    So in return, why do you think spaces are better ? Not "as good", "better", is what I'm asking. Ignoring current conventions (those can be changed) and the salary thing (unless you have a reliable source, in which case, I'm curious) if possible
  • 0
    @irene Now I'm curious about what system wouldn't handle tabs correctly, do you have examples ?
  • 0
    @irene GitHub handles tabs fine, and you can even pick your indent size with the ?ts argument, try changing the one in this link with any integer between 1 and 12 :
    https://github.com/jquery/jquery/...

    If anything, I'd say GitHub is yet another reason to prefer tabs (also, although I admit to the fact that having a tab size of 8 by default is weird, it would still qualify as 'handled fine' if it couldn't be changed, as the indents would still be perfectly clear and readable, and not cause any harm that some crazy 8 spaces indenter wouldn't accomplish) 😁

    Any other poor tab handlers come to mind ?
Add Comment