Tabs vs Space

Let's end this war once and for all. Which is best?

Attached: tabs-vs-spaces.jpg (1440x679, 132K)

Other urls found in this thread:

github.com/jcsalomon/smarttabs#smart-tabs
en.wikipedia.org/wiki/Whitespace_character#Overview)
twitter.com/NSFWRedditVideo

Obviously tabs, fewer keypresses equals greater efficiency (also applies to deletion).

three spaces
anything else is literal faggot tier

tabs for indentation, spaces for alignment.
hang yourself

Fpbp

I don't care so long as whatever system you are using is consistent

4 space tabs.

tabs all the way
it's unironically a dopamine hit to press the tab key which is a bit satisfying in itself and see the line move over a big chunk

>fewer keypresses
What? Indenting with spaces takes EXACTLY as many keypresses.

>using tabs or spaces at all

Do you realize that you can use tab to insert spaces with many text editors / IDEs?

>Let's end this war once and for all. Which is best?
are you for fucking real? looking for general consensus on something here of all places? bad troll is just bad...

Spaces only

2 spaces
because it's what im used to

:set ts=4 sw=4 expandtab

Tabs for indentation, spaces for formatting, e.g. lining up an expression spread out over different lines while using the same number of indent tabs for each. Anything else is just laziness/deliberately gimping yourself.

Forgot to mention that tabs can also let you change how many characters wide you want indentations to be, and using spaces for formatting means you can do that without fucking up how the code itself looks, so you don't need to argue over how many spaces an indent should be since it just becomes an editor formatting option.

dabs

4 tabs of 2 spaces
/thread

I let my editor and the auto-formatter handle this kind of shit. I don't even know what most of my files use. They look good with no extra effort. Why should I even care?

Tabstop should be 8 anything else is heresy.

Tabs indent, spaces align.

Tabs all day long
C, C++, Java, ... 8 spaces wide
HTML and markup with huge levels of indentation 4 spaces wide

baste pragmatist, quite redpilled if i must say so myself

>Let's end this war once and for all. Which is best?
Spaces.

Attached: 2019-08-29-14:51:51-screenshot.png (408x97, 15K)

Tab width should be whatever the user likes (13, in my case) since that's the entire point of tabs

Tabs. I'm a lefty, so it's instinctive for me to hit the tab button

tabs as spaces.

this. fuck the kernel

4 spaces = 4 keypresses
1 tab = 1 keypress
Nobody indents with one space

Tabs for indentation, spaces for formatting.
Besides, it doesn't matter when any editor worth its salt can handle both effectively.

>presses tab
>depending on languages x spaces get inserted
tabs kill compilers etc
just use tab that inserts spaces fucking whitespace raping fuckard
enjoy your low tier programming languages and your ugly code

Get a decent editor that turns tabs into 4 spaces.

>4 spaces
its language dependent

If you don’t map tab to X number of spaces in your editor you are retarded. Pure tabs is horrible idea and some things like YAML for example don’t even support it.

Depends on the project

whatever works best for you

kys
// Tab size: 4 // Tab size: 2
if(foo) { if(foo) {
--->char quux[4] = {0, 1, ->char quux[4] = {0, 1, // "0" and "2"
--->................2, 3}; ->................2, 3}; // remain aligned
} }

github.com/jcsalomon/smarttabs#smart-tabs

Attached: smart-tabs.png (717x325, 86K)

tabs only and its not even up for debate

Both. Configure your editor/IDE to use 4-space tabs.

This is the hallmark argument of a tabtard who has no idea what he's talking about

Reminder that tab users are worse programmers who make less money on average

Attached: salary_graph-1-1024x731.png (1024x731, 156K)

wrf

Attached: 1E9B8F62-7295-4924-9B75-5042D03407D0.jpg (872x500, 121K)

Abomination

real programming language

Attached: 497035F1-DEC0-48E6-ADEA-24F3AE3A6598.jpg (500x500, 70K)

Attached: 1564179135837.png (326x250, 33K)

I had to look this shit up. No wonder that dutch cuck got trolled with sicp.

Tabs you dummy

You indent with spaces by pressing tab

fuck all you non printing characters,
semicolons rule

tabs expanded to spaces

found the LISP programmer

True patrician stance on this issue.

fucking retard lmao

I can beat the shit out of you & all 3 of them simultaneously. It's just icing on the cake that the ginger will be there taking the blows as my meat shield while I pummel all of you. So in reality what you think & say do not matter.

based

great argument, brain-dead retard

>tabs kill compilers etc
TWENTY FUCKING NINETEEN

I'm sure that the offset is by people mantaining legacy projects, keeping the current project style takes the precedence, obviously.

sounds like you're a bit scared, my guy

arent you supposed to be tying a rope right about now?

if you have a mechanical keyboard(or a t420 keyboard), then spaces. if you have a shitty keyboard like an apple or t430... one then tabs.
otherwise its all the same once it goes thru the compiler

Attached: 1524489088085.png (1300x2000, 251K)

Tab that makes 4 spaces.

Imagine being this retarded and using an editor that doesn't replace tabs with spaces automatically.

Spaces are the only answer if you want consistency across your project with others and if you do any special formatting that doesn't fall in line with your indentation multiple.

patrician

Attached: 1554644805056s.jpg (210x240, 7K)

Cringe.

only python has TabError i believe
tabs do not kill compilers
it depends on your text editor how long tabs are

>ide automatically changes tab autoreplace to whatever number of spaces current file has
>press tab, so less keypresses, but ide inserts it as tabs/spaces according to whatever file has
>linter runs in pre-commit hooks so individual stupidity gets corrected to company-wide style
how is this even an argument

do you use emacs?

The default text editor in Mint is set to automatically indent like tabs but put four spaces instead. It pisses me off because every time I install Mint, I have to change the behaviour back, or else I have to grep all my documents and edit out the spaces.

Quote Wikipedia (en.wikipedia.org/wiki/Whitespace_character#Overview) :

>the common whitespace symbol U+0020 SPACE (also ASCII 32) represents a blank space punctuation character in text, used as a word divider in Western scripts.

U+0020 is designed explicitly for punctuation purposes and not for indenting purposes, unlike the horizontal tab character, which is designed explicitly for tabulation, I.E. indenting.

People who legitimately argue for spaces in 2019 are either zoomers or deluded.

>aligning anything
No. Two tabs after newline if you need to break up lines, always brake as early as reasonably possible. Faster, easier to maintain and just as readable as useless alignment.

I am an enlightened centrist and choose both:
1. Odd lines have tabs followed by spaces.
2. Even lines have spaces followed by tabs.
Everyone will be satisfied, right?

None of both. All of my code sits at the left border of the editor. If you use indentation you are literally a braindead quadruplefaggot who deserves to be beheaded and stoned simultaneously.

just use this

#include

int main()
{
int c, j;
int i = j = 0;
char s[1000];
while((c = getchar()) != EOF) {
s[i] = c;
if (c == '\t') {
for(j = s[i]; j

Tabs.
Configure it to look like whatever you want.

if everyone used tabs we could all customise our editors to show them with whatever thickness that we wanted.
I dont get the use of spaces at all, but weirdly it seems to be the new way of doing things

Just center your text, no indentation needed

The for-loop block should not be on the same indentation level as the loop declaration itself, regardless of whether it's bracketed or not. And a space between #include and "

>want to use tabs
>tfw standard python style says I should use spaces instead
How do I convince my coworkers I'm right?

Spaces. There's no reason to use tabs when any good editor can insert X spaces when you press the tab key.

Stallman says spaces

python requires it to be consistent, not be a specific one

2 tabs of 4 spaces. duh.

>space between #include and "

Tab key redirects to 4 spaces

I swear, C programmers will pop up out of nowhere if you write something to contribute good honest feedback. I was mostly just posting my code as a troll, but now I want to rewrite it according to your suggestions and post it on my github for people to use as an actual useful program.

It's a readability issue. I don't have a problem with it, but I can imagine reading thousands of lines of code per day can really assault your eyes.

who cares?
in real languages it doesn't matter

>use spaces
>code will always be indented exactly as you intended, will forever look the same when using fixed-width fonts

>use tabs
>every editor uses different tab sizes, code is almost guaranteed to look different as soon as someone else even glances at it

I'm sure the only people defending tabs are braindeads like , who think people are actually hitting the spacebar 4x every line.

>indented exactly as you intended
>giving this much of a shit about how people look at your code
Tabs for indents, spaces for alignment. You can set the tab width however your autism tells you, I can set it how I want, and the code will still look sensible regardless. Everyone wins.

no, whatever flavor of the month ide my employer chooses. zero doubt that you can replicate the feature in emacs, anyways

Please be trolling. I sincerely hope you aren't this retarded

I prefer tab, but it doesn't really matter because a linter would be trivial to run to fit your preference or someone else's.

1 space tabs

I press tab but my editor inserts two spaces. Who the fuck cares.

>Not a power of 2
Out!