[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Left or Right?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 25
Thread images: 4
File: tabs-vs-spaces.jpg (126 KB, 1440x679) Image search: [Google]
tabs-vs-spaces.jpg
126 KB, 1440x679
Left or Right?
>>
i like spaces
not enough to be autistic about it.
>>
>tabs
>always more organized
>requires half the button pushes
litearlly no reason to go right
>>
I always use either 2 or 4 spaces.
>>
There's a song that goes with this. It goes something like this.

Whoever tabs, must stab. Whoever spaces, must wins in this case.
>>
Tabs for indentation, spaces for alignment. Suckless made it clear. Now stop posting this thread every day.
>>
File: 1449863530859.gif (1 MB, 500x404) Image search: [Google]
1449863530859.gif
1 MB, 500x404
Tabs for identation, spaces for alignment
>>
>>54818937
does that song make sense or rhyme or something in whatever language you speak natively?
>>
>>54818952
most retarded thing I've ever heard. just use fucking spaces for everything.
>>
>>54818895
>>requires half the button pushes
are you retarded? your fucking editor converts tabs to spaces. you dont actualy indent by pressing space fucking moron

>>54818865
for some reason i prefer 3 spaces
>>
I prefer tabs but don't mind spaces as long as they are 4 spaces OR more.
2 spaces is disgusting unreadable garbage and the sole reason I ditched Scala (an otherwise interesting language) and several other languages that adopted this asinine convention.
3 spaces is autism but still slightly more readable than 2 spaces trash
Might as well not even ident at that point
>>
Tabs make file sizes smaller.
>>
>>54819027
>>>requires half the button pushes
>are you retarded? your fucking editor converts tabs to spaces. you dont actualy indent by pressing space fucking moron
Your text editor should take care of this, but you probably use some shitty editor that doesn't even take care of indentation.
>>
>>54819481
If spaces become a problem to the size of your source code, you're doing something wrong.
>>
>>54818865
tabs ftw.
>>
for people who prefer tabs, working on the code of someone who uses spaces is maddening
>>
Tabs with 1 extra space
>>
Tabs converted to double space
>>
File: 1459115952765.png (120 KB, 385x626) Image search: [Google]
1459115952765.png
120 KB, 385x626
>>54818969
>>54818952
Objectively correct
>>
File: 1405711816872.gif (1 MB, 280x210) Image search: [Google]
1405711816872.gif
1 MB, 280x210
>>54819870
fucking madman
>>
>>54818865
>use gedit
>settings dictate that it inserts 4 spaces when pressint tab
Best of both worlds.
>>
>>54818865
space.c
#include <stdio.h>

int main() {
int i;
for(i = 0; i < 10; ++i) {
printf("Hello /g/");
for(int g = 10; g > 0; g--) {
puts("Dope. ");
}
fprintf(stdout, "\n");
}
return 0;
}


tab.c
#include <stdio.h>


int main() {
int i;
for(i = 0; i < 10; ++i) {
printf("Hello /g/");
for(int g = 10; g > 0; g--) {
puts("Dope. ");
}
fprintf(stdout, "\n");
}
return 0;
}


tab.c size = 187 octets
space.c size = 228 octets
tabs are used for ...tabulation why do you want to use spaces? It's retarded, even your text editor knows it's shit and won't let you use "real" spaces and will use tabs under the hood to display the text.
Try changing tab by space in the settings and it won't change the size of the file.
>>
>>54818865
>spaces
yeah, that's the way-
>two instead of four
REEEEEEEEEEEE
>>
If I'm writing a new file in a project I own/command, I'll use tabs. If I'm editing another file, my editor will automagically detect the tab setup and Just Work.
>>
Not a programmer or anything but I always felt tabs were nicer
Thread replies: 25
Thread images: 4

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.