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.
Tabs are `4' spaces, so I am not sure what the question is.
Name:
Anonymous2009-03-10 23:04
My tabs make spaces.
Name:
Anonymous2009-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).
>>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.
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'.
>>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:
Anonymous2009-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.
>>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:
FrozenVoid2009-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:
Anonymous2009-03-11 14:57
This is a stupid thread.
Name:
Anonymous2009-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:
Anonymous2009-03-11 15:36
>>26
Bashing my indentation style seriously offends me. Please stop.
>>49
if the gnu project starts using that style and kills that info faggotry i might actually consider contributing code to the hurd.
if they make GPLv4 equivalent to the 2-clause BSD license i'll definitely contribute code.
Name:
Anonymous2009-03-12 2:28
>>50
Or you could just use BSD now. You wouldn't even need to contribute code, because it already works.
if they make GPLv4 equivalent to the 2-clause BSD license
This is never going to happen as long as people choose to fork the software and make it proprietary.
Name:
Anonymous2009-03-12 4:23
>>56
FreeBSD, NetBSD, OpenBSD, MirOS, DragonFly, MidnightBSD, etc. aren't proprietary. what makes you think something that hasn't happened until now is going to suddenly start happening for no reason?
Name:
Anonymous2009-03-12 4:25
>54-55
Correct. Even if the HURD were to be completed someday...would anyone actually use it?
>>57 fork the software and make it proprietary.
The fork is proprietary. The original is not
Name:
Anonymous2009-03-12 4:34
>>57
Of course they are not proprietary operating systems. I think he was just hinting at the fact that the BSD licenses allow code to be used in proprietary programs originating from code in free software programs...whereas in the GNU GPL that type of activity is not permissible.
>>61
The copyright holders over the software have the implied authority to license their software under different terms to different people. If you extend the GPL Java system or OO.o and distribute the derivative, the derivate must also be free.
Name:
Anonymous2009-03-12 5:30
>>62
so letting only one evil corporation make proprietary forks is better than letting anyone do it?
>>63
It is not better as all proprietary software are harmful to the recipients of that software, but that's the way Berne Convention copyright works. The GPL is a good enough hack for its intended purpose: to ensure that free software will always remain free. "Free" in this context refers to users' authority to run the software as they wish, tinker with the software as they wish, share the software as they wish and contribute to the community.
>>64 harmful
Yeah, like how when you use Windows, your computer stabs you in the eye.
No actual users give half a fuck whether they can "tinker with the software". They just want to click the word-processor button and type a letter, not masturbate to fibanocci sequences.
You free software evangelists are so disconnected from reality it's hilarious.
>>65
Yes, it is a fact that general society fails to care for their freedom. However, it doesn't change the fact that users cannot live in freedom because they lack the authority to control their own computer. It doesn't change the fact that users are forbidden to live as upstanding citizens. Only free software allows society to live in freedom.
Yes, it is true that users are completely ignorant about computer programming. That doesn't change the fact all they need is the authority to tinker with the software in order to live in freedom. You seem to forget that users can hire a programmer to extend or implement software to include a word-processor buttons and to type letters.
Join us now and share the software;
You'll be free, hackers, you'll be free. x2
Hoarders may get piles of money,
That is true, hackers, that is true.
But they cannot help their neighbors;
That's not good, hackers, that's not good.
When we have enough free software
At our call, hackers, at our call,
We'll throw out those dirty licenses
Ever more, hackers, ever more.
Join us now and share the software;
You'll be free, hackers, you'll be free. x2
Name:
Anonymous2009-03-12 20:37
>>65
Well, why the hell do you think distributions like "Ubanto" exist? So the "HURR DURR" population of computer users can click on the word processor butan and write letters.
>>66
8/10. It was going well, but then you posit the idea that somehow, Windows users don't have authority over their machines. I assume you mean this in the personal sense, because the administrator of the machines should have the authority over it in the business sense, as opposed to the user.
A child could see through that statement as trolling. Back off a little next time and you could get the full 10/10.
>>70
If slavery was legal, then some people will choose to sell themselves into slavery. Choosing to put yourself into slavery isn't freedom. First, the slave must get out of that situation of servitude before the slave is considered free. Likewise, choosing to accept proprietary software isn't freedom. The reason is that users are expected to live in helplessness. Users choose to give up their authority to run software for any purpose (freedom 0). Users also choose to choose to give up their authority to tinker with their software (freedom 1). The user must first appeal for help from the master of the system whenever there needs to be some change in the user's system. How does one live in freedom when one needs permission to conduct some private business?
The people operating the machines are not necessarily the computer users. I operate automated teller machines at my bank to make use of the bank's services. I am operating the bank's computer system and not MY OWN computer system. When I go visit a friend's house and ask to use their computer, it is not MY system that I will be operating; I'll be operating my friend's system. Of course I must first ask permission to do some things on their system.
When it comes to my own personal machines, I will have to give up my freedom in order to use proprietary software; I will no longer have full authority over my machines. The good news, however, is that I can reclaim my freedom when I get rid of proprietary software.