[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
▼ Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


Quick melanin check
>>
Tabs are much easier to deal with.
>>
>>109951986
>sometimes 8-chars long
>sometimes 4-chars long
>sometimes 2-chars long
>>
>>109951933
(let ((x 1))
(f
(g x)))

only possible with spaces
tabs big gay
>>
>>109952187
Yeah, so?
>>
>>109952187
it's always one char long
you can configure your editor to how wide you want it to be rendered
>>
>>109952187
But enough about spaces
>>
>>109952318
And then someone reviews your code in another editor with a different setting and it looks fucked.
With spaces, it's consistent. 4 spaces is 4 spaces.
>>
>>109951933
Depends on the language.
C-like: tabs
Lisp-like: spaces
>>
>>109952333
a single space is always 1-char long
>>
Unicode needs a block just for tabs of different widths from 0-width tabs to 128-width tabs in increments of 0.1 and 1/64 fractions. This is what Unicode was created for.
>>
>>109952340
then you're using tabs wrong
>>
>>109952388
true, same as a tab
however with spaces you need to use 2-8 of them for the same purpose as tabs, so effectively they are 2-8 characters long
>>
>>109951933
Spaces but editor set up to have tabs input or remove 2 spaces if valid.
>>
>>109951933
C chad checking in
set tabstop=8
set shiftwidth=8
set softtabstop=8
set expandtab
>>
>>109952187
Permanently convert tabs to spaces. Easy fix.
>>
Tabs are for boomers and top 1% coooooders who are able to configure their editors.
Spaces are for the rest.
>>
>>109952240
>inconsistent indentation
Absolutely disgusting.
>>
spaces. specifically, 3.
>>
Tabs
>>
Tabs for structure, spaces for alignment.

But in reality I think my IDE is set to emulate tabs with spaces or some shit, I don't even care anymore.
>>
>>109952667
nope, it's consistent
there's nothing right above g, so the indentation go to another level
>>
>>109951933
Used to like tabs, used them exclusively, usually 4 spaces wide. Then got into the habit of aligning small bits of code so that mistakes across lines would pop out, so I started using tabs for indentation and spaces to align stuff, and around the same time reduced to 3 spaces wide. But that broke shit in some editors, not to mention the tab width inconsistency. I also quickly became tired of reflowing comments to sort-of-maybe-not-really fit consistently regardless of indentation depth and tab width. Reducing tabs any further made no sense so I just switched to spaces, and now I just use 2 spaces everywhere.

I still use tabs for markup languages like HTML/XML, it just makes sense there.

>>109952499
>8
Fucking animal.
>>
File: blocks.png (15 KB, 341x520)
15 KB PNG
>>109951933
Unlike primary school Word documents, tab is not a shortcut for adding white space faster.
>>
>>109952412
Bad terrible idea of someone who never really had to deal with text rendering
>>
>>109951933
Any program that cares about one vs the other is not production ready.
>>
File: 1000039299.png (583 KB, 736x736)
583 KB PNG
>>109951933
One large unformatted text string, please
>>
>>109952240
all the wisemen say you use tabs for indentation, and spaces for alignment

lisp doesn't have indentation, only alignment so you cannot use tabs there
>>
File: vim_fitness.jpg (266 KB, 1440x2146)
266 KB JPG
>>109951933
Your editor should be able to solve this
>>
>>109951933
Every single space codebase I have seen has fucked up indentation. Its so easy to get misalignment when nothing stops you placing the cursor inside an indent. This is the one thing I have never understood about those who use spaces, how do you deal with indents not being atomic. It makes editing code absolutely suck.
>>
>>109952340
Looking fucked is still better than getting fucked. With spaces you have the same issue with space setting being different, but now you end up with multiple different indentation widths in the file. With tabs you only get the occasional alignment error for arguments, vs the entire indentation being fucked when you use spaces.
>>
i mix them shamelessly



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.