Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Tabs VS Spaces

Name: Anonymous 2009-03-10 22:42

Which do you prefer in your code?
Personally I like tabs more but they're misused for formatting instead of indentation by many which is annoying and kind of defeats the purpose.

Name: Anonymous 2009-03-10 23:03

Tabs are `4' spaces, so I am not sure what the question is.

Name: Anonymous 2009-03-10 23:04

My tabs make spaces.

Name: Anonymous 2009-03-10 23:07

tabs are waaaay better the spaces for code.  4-8 key presses to indent/un-indent vs 1 key press.  Any good editor has options to set how long the tabs are, so you can set any tabbed code to your liking(even you, 3 spacer).

Name: Anonymous 2009-03-10 23:13

>>2
>>3
faggots

Name: Anonymous 2009-03-10 23:15

Emacs indents my code automatically, so I do not bother with these trifles.

Name: Anonymous 2009-03-10 23:21

123 abc

Name: Anonymous 2009-03-10 23:31

>>4

really?
   even
      me?
         :D

Name: Anonymous 2009-03-10 23:31

Visual Studio writes my code automatically, so I don't have to bother with these trifles.

Name: Anonymous 2009-03-11 1:12

>>6
Emacs
0/10

>>9
Visual Studio
3/10

Name: Anonymous 2009-03-11 2:19

>>10
Rating posts
( ≖‿≖)

Name: Anonymous 2009-03-11 2:26

>>1
I used to be in the "tabs for indentation, spaces for formatting" camp, until I realized that I spent too much time worrying about whether my editor was inserting tabs or spaces in the places I wanted, so I switched to spaces-only.

Name: Anonymous 2009-03-11 3:45

I program exclusively in piet, so I don't have to deal with indentation.

Name: Anonymous 2009-03-11 4:39

This is why I don't indent my code; no one can agree. FIOC be damned.

Name: Anonymous 2009-03-11 4:53

i write run-length-encoded brainfuck, with no whitespace.

Name: Anonymous 2009-03-11 5:07

I code in Whitespace, with no comments.

Name: Anonymous 2009-03-11 5:33

I use Python. I can use both tabs and spaces!

Name: Anonymous 2009-03-11 5:34

>>17
Die in a fire.

Name: Anonymous 2009-03-11 6:41

I use python and vim with 'set list' (shows special characters such as tabs) and tab-size set to 7. Thus if I indent, say, a line with 'if something:' by seven spaces and the next lines with the if-block contents by one tab, python understands the indentation (since it thinks tab is 8 spaces), while I have nicely aligned code with dark blue '>' characters (set by 'listchars') showing me which code is 'indented'.

Name: Anonymous 2009-03-11 10:41

>>11
( ≖‿≖)
    ( ≖‿≖)

Name: Anonymous 2009-03-11 11:44

>>19
People like you are why programming indentation into a language's syntax is fucking dumb.

Name: Anonymous 2009-03-11 11:56

I use tabs for indentation levels and spaces for positioning within a level.

Name: Anonymous 2009-03-11 12:06

I don't indent.

Name: Anonymous 2009-03-11 12:57

>>1
formatting
indentation

How are they different?

Name: Anonymous 2009-03-11 13:48

>>24
Indentation:
int main() {
    return 0;
}


Formatting:
int shortVarName              = 1;
int veryLongAndUselessVarName = 0;

Name: Anonymous 2009-03-11 13:59

>>25
K&R style considered PIG DISGUSTING.

Name: Anonymous 2009-03-11 14:20

>>26
That's not even K&R, because K&R still put functions' braces on separate lines.


#include <stdio.h>
#include <string.h>

int main(int argc, char *argv[])
{ // <-- THIS IS ALWAYS THE RIGHT WAY, FAGGOTS.
    int i;
    size_t arg_len;

    for(i = 0, arg_len = 0; i < argc; ++i) { // <-- THIS IS OK.
        printf("%i: %s\n", i, argv[i]);
        arg_len += strlen(argv[i]);
    }

    printf("Length of arguments: %zu\n", arg_len);
    return 0;
}

Name: Anonymous 2009-03-11 14:23

VS vs vs

Which do you prefer in your code?
Personally I like vs more but they're misused for comparison instead of contrast by many which is annoying and kind of defeats the purpose.

Name: Anonymous 2009-03-11 14:46

>>27
THIS IS OK.
You're a flaming faggot, that's what I think. Do you really enjoy two closing and a single opening paren on the left side of your code? Woah, that's beyond me. No, seriously, doesn't it bother you that the function parens are lined up, but the loop ones are not?

Name: FrozenVoid 2009-03-11 14:56

#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]){int i;size_t arg_len;for(i=0,arg_len=0;i<argc;++i){
printf("%i: %s\n",i,argv[i]);arg_len+= strlen(argv[i]);}printf("Length of arguments: %zu\n",arg_len);return 0;}

___________________________________________
If there is no struggle, there is no progress.

Name: Anonymous 2009-03-11 14:57

This is a stupid thread.

Name: Anonymous 2009-03-11 15:35

>>29
Parens? Do you mean braces? And if so, please clarify what you mean. I actually prefer the BSD/Allman style, but I've occasionally used K&R, but only in C code: for C++, C#, Java, or any other braces language, I use BSD style.

Name: Anonymous 2009-03-11 15:36

>>26
Bashing my indentation style seriously offends me. Please stop.

Name: Anonymous 2009-03-11 15:40

>>30
for(i=0,arg_len=0;i<argc;++i)
Lol

Name: Anonymous 2009-03-11 15:40

i use a same-line opening brace on functions in c

Name: Anonymous 2009-03-11 15:47

>>25
Oh.

Also, I don't understand why anyone would use
while (true) {
    fork();
}

This braces placement is PIG DISGUSTING

Be consistent; use either
while (true) {
    fork(); }

or
while (true)
{
    fork();
}

Name: Anonymous 2009-03-11 15:49

>>36
It doesn't waste a whole 2 lines on braces while still clearly delimiting blocks

Name: Anonymous 2009-03-11 15:50

>>36
YOU are pig disgusting

Name: Anonymous 2009-03-11 15:51

lolling all the way to the bank

Name: Anonymous 2009-03-11 15:52

>>36
You're mom is PIGDISGUSTING. Go away with your fugly braces placement.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List