2
Nbfour
7y

Serious question here: why the discourse about spaces vs tabs? Hitting the tab key /once/ is just much more efficient than hitting the space bar /four times/, isn't it?

Comments
  • 2
    I hit 1 tab and get as much spaces as required. It's a miracle!!!

    IOW: Who cares? Your editor/IDE. If not, you're doing it wrong
  • 3
    Nice trolling. *grabs popcorn, watches the show*
  • 0
    @k0pernikus I'm serious. Whitespace is whitespace. Most IDEs automatically convert whatever you input so it's uniform across users. For ex. intellij converts tabs to spaces.
    But I still met people who'd get seriously angry when someone was not using their preferred whitespace characters.
  • 1
    @Nbfour you understand that nobody clicks space 4 times, hm? Any text editor has an option of how to interpret tab key, so when you press it, you can get 4spaces for one key! :O

    Maybe Vim people click spaces though.
  • 0
    @NbFour the discourse is not about which key you are hitting, but what character you actually use in your files.

    Using spaces: people can't choose their tab length (some people prefer 2 spaces or 3 spaces instead of the more common 4 spaces)

    Using tabs: you can't nicely align with spaces when you need something that isn't a multiple of your tab length, because changing tab length will totally break this alignment.
  • 2
    @Nbfour It's a non-issue. Just be consistent in your codebase. Whoever owns the codebase decides either way, and then you just roll with.

    Compare it to driving on either the right lane or the left lane. Each country has to decide, and then you just fucking roll with it.
  • 1
    @Zyberg vim people here: no. My vim autodetect the indentation used, ans fall back to 4 spaces
  • 0
    @willol oh, nice to know! Thought that perhaps Vim was lacking at least something.
  • 0
    @Zyberg vim lacks everything, but there's config, plugins and scripting :)
Add Comment