>>8
No. It'll still look the same, just a bit more horizontal space.
People with huge tab sizes usually have huge monitors as well, so they are probably prepared.
Well, personally, I use two spaces most of the time, but that's because I'm a Haskell faggot.
Name:
Anonymous2007-10-18 12:07
>>1
Copy some tab-indented code from your code editor into another editor or into a textarea on /prog/. Enjoy your formatting issues. Tabs just introduce pointless issues. Why use tabs when spaces suffice?
Name:
Anonymous2007-10-18 12:09
>>11 No. It'll still look the same, just a bit more horizontal space.
Yes, it will appear differently than your version. I can't see what could be good about that.
People with huge tab sizes usually have huge monitors as well, so they are probably prepared.
That is just stupid.
Well, personally, I use two spaces most of the time, but that's because I'm a Haskell faggot.
It's irrelevant that you use two spaces all the time if you're arguing for tab-character-based indentation, and I don't care what language you use.
It's bad enough that your code isn't semantically portable; and now you don't even want to write textually portable code.
Name:
Anonymous2007-10-18 12:13
Tabs are good for scalable indentation of code.
Name:
Anonymous2007-10-18 12:16
New holy war! Thanks >>1, emacs vs vim was getting old.
In theory, you can use either, as you wish, but you shall respect the forced indentation of code.
However, in the real world, many people work on the same project, and others always use shitty editors. These editors will eat tabs and/or spaces and convert one to another whenever they feel like it. For example, they may do so when you edit a line, even if you don't edit the line indentation. (In the best case, they'll just convert the whole file.) Then Python code breaks.
What's worse is that when you open it in your editor, everything looks like bullshit unless your tabs setting is the same as the moron's who edited it. And since morons rarely use the only correct setting — 4 spaces —, you'll be damned.
So don't rely on tabs. They'll always cause trouble. Use 4 (FOUR) spaces. It's the only way to heaven. Everything else is flawed. Also, 2 spaces faggots make code shitty to read, and 8 spaces faggots are such faggots they don't even deserve to code. 4 is the only perfect balance: even, power of two, not too much nor too little, and looks good.
>>19
>It's hilarious that Python breaks just because somebody used tabs instead of spaces or vice versa.
Yes, a language in which a form of syntactic tokenisation is provided by indentation. And?
Name:
Anonymous2007-10-18 12:32
>>21
Nothing, it's perfectly cool to use WHITESPACE for that. Stupid other languages, using characters which don't get eaten by editors and such.
Name:
Anonymous2007-10-18 12:33
>>21
What does that have to do with the topic? Or is that just your way of saying ONE WORD THE FORCED INDENTATION CODE THREAD OVER.
Name:
Anonymous2007-10-18 13:13
>>7
Why the fuck would you break up the for loop arguments to multiple lines? That's just ugly.
Name:
Anonymous2007-10-18 13:22
>>24
I would if the statements were really long -- Sepples::iterator long, that is!
Name:
Anonymous2007-10-18 13:52
Using two spaces is only good for hiding that you have deep code nesting (read: that your code sucks).
But it's bad for readability. Especially for old hackers, who's eyes aren't working as well as before.
8 spaces (normal tab size) is way too much again, and may makes your code lines go way past 80 characters in length. A good compremise is 4 spaces.
Still, a lot of people seem to swear by 2 spaces, as it's their pride their defending. So to those of you who use less that 4 spaces for indentation, please use tabs. That way I can set my tabsize to 4, and enjoy maintaining your code more :)
Name:
262007-10-18 13:58
I just wanted to point out that I like the points >>16 and >>7 make.
Name:
Anonymous2007-10-18 14:19
1 space or GTFO
Name:
Anonymous2007-10-18 14:22
press tab to insert several spaces.
Name:
Anonymous2007-10-18 15:36
Tabs, obviously. What kind of retard is going to put non-resizable indentation in their code?
What's so hard with doing s/\t/g / or s/ /\t/g?
I use 8-space tabs, so what? It is a single character, \t and the way it is represented is system dependant.
If i have, say 1000 tabs in my source code it's 1000 bytes; If i'd use 4 spaces it would be 4000 bytes, which is a horrible waste of bytes.
And 1000 tabs are not many, a src of 1000 lines should have at least 1000 tabs.
I agree on saving bytes being really important. I only use 1 character for variable names if possible. For example h instead of hostname. This saves me at least 7 bytes each time I use it! I also try to keep my function names to a maximum of 4 characters.
Name:
Anonymous2007-10-18 16:40
What the hell does that matter in fucking source code on today's computers?
Here you are, making a game with volumetric fog rendering and a billion post-processing effects, and you're willing to fuck up your code's readability to save a few fucking kilobytes?
Fuck.
Name:
Anonymous2007-10-18 16:42
>>34
4 is a bit silly i think; give some examples?
I prefer 6 maybe with prefixes/suffixes when needed (like libc)
as for s/ /\t/g replacing more than i want, that's not the case with s/\t/<anything>/g is it?
Tabs are superior, if i don't like them 8 spaced, i change my configuration, if you give me src with 8 spaces, i have to use some fucking regex on the file buffer which is retarded.
Name:
Anonymous2007-10-18 16:45
>>35
Because it's a FUCKING PAIN IN THE ASS to type enterprisey named functions? And don't mention name completion in `proper' text editors.
>>41
because indentation is trivial. >>42
thats retarded.
Name:
Anonymous2007-10-18 20:13
>>43
You're telling me that it's better to do trivial things yourself than to make the computer do it for you? Do you just not know how to program or something?
Name:
Anonymous2007-10-18 20:16
>>44
NO GODAMIT YOU FUCK
I MENT
THAT INDENTATION IS TRIVIAL
AND THE EDITOR SHOUDL DO IT
IM NOT >>40
GODUFKCUGIDNAKFNASDLFJDAS
Name:
Anonymous2007-10-18 20:40
>>45
It doesn't matter who you are. I asked Why would you choose to use an editor that makes you indent manually?
and you said because indentation is trivial.
Neither. Spacing is part of the presentation layer, not the underlying code structure that the system stores, and allows each editor to have their own indentation and spacing preferences without stomping over version control. Oh, wait, you're still using fucking direct 8-bit text streams for source?
Call me a massive c-faggot which i probably am, but spaces in C for indendation are utterly stupid.
Tabs all the way in C.
When we talk about programming i have C in mind, while others don't (silly of me)
However, i understand why someone who uses Haskell needs spaces instead of tabs.