4
Areg
1y

Let's settle this once and for all, 2 space indentations or 4?

Comments
  • 7
    Who gives a shit when there are serious issues to worry about in the codebase.

    Plus whatever the codebase has the most of is the convention you're stuck with. Otherwise it hurts readability trying to support two
  • 0
    Life is all about problems....you settle one you shorten your life.....think before settling one
  • 0
    @MammaNeedHummus Then go solve global hunger maam
  • 2
    @levi2707 so 1 space?
  • 4
    8 spaces
  • 2
    @Areg who cares about readability if it's not giving errors....no spaces
  • 3
  • 5
    Weak attempt at updoots. Still, 4 is the answer.
  • 1
    @CoreFusionX i deleted them just for you mr redditor
  • 2
    @Areg there is one mouse click I will never get back... lol
  • 2
    @Demolishun you value your mouse click more than his self respect...🤣🤣
  • 1
    Using 2 for the { and another 2 for the content.

    This makes oneliner blocks having the same indentation for { and the text as normal blocks.

    Having the { and } on their own indentation level makes the code more readable than any other way. It is sad that this isn't popular, i question why.

    }} To end the ones left open open
  • 3
    as i already answered probably a few times: I don't give a shit, i just use whatever the formatter is preset to in my currently used IDE.
  • 4
    @thebiochemic IT'S YOU! You are the REASON my codebases have spabs and taces!
  • 1
  • 3
    @Demolishun don't even start like that, you could've just autoformat the file you know 🤣

    Even better, the pipeline does it, so whenever you pull from git, it always has default formatting, and nobody cares if i end up using π spaces.
  • 6
  • 2
  • 1
    4-width tabs all the way

    I don't get people using spaces just to have their new fangled IDEs then trying their best to pretend they're tabs
  • 1
    @Areg reading my profile probably answers that.
  • 1
    1 tab character
  • 2
    I'm a 2 spaces fan currently, but I used to prefer 4 spaces and the hassle of the transition period is drawing me towards \t where this could just be an IDE setting change.
  • 2
    @happygimp0 it isn’t popular because it causes everyone that sees it die a horrible face melting death!
  • 6
    Don't care. Other stuff more important.
  • 4
  • 2
    @Demolishun I got that reference 😂
  • 7
    3.14
  • 1
  • 3
    4 tabs + 2 spaces
  • 2
  • 1
    2,2,4,6,10,16,26,42,68

    Prevents over-nesting.
  • 1
    Python: 4

    TS: 2

    Others: Don't care I don't use them
  • 0
    @Lensflare Why? Are there any non-opinion based arguments against it?
  • 2
    Why should we settle at all. Can we not create a system where a code is saved without indentation but formatted only when disolayed in an IDE based on some local config file. Indentation discussion is boring.
  • 0
    @happygimp0 no, it’s inherently opinion based. And the explanation is fairly simple: Most people dislike it.
  • 0
    @Lensflare There are some features of a indentation style you can measure and some you can approximate. For example: Line usage, if { and } are aligned, space usage, minimum keystrokes to navigate somewhere with vim (or a similar editor like emacs), ....

    Things like complexity of the indentation style can be evaluated, not measured nor is it exactly, but to get some idea. Like how many rules does it have or how different are they from one to another (like putting always a space after ( vs only do it when you call a function but don't do it in the declaration on a function, ...)

    Many things are just opinion based, but not all. And it is opinion based how important the individual features are.
  • 4
    I use 7 nonbreaking spaces, or 3 of whatever this is ⳦, depending on the project.

    My IDE's font is comic sans cursive.

    Half of my screen is light mode, the other dark, with high contrast splashed around here and there.

    I also have a script that changes my keyboard layout at random intervals.
  • 2
  • 3
    @cuddlyogre I use indentation for version control.

    See here: https://devrant.com/rants/1336740/...
  • 1
    @happygimp0 No. I refuse to believe it. It's impossible.
Add Comment