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

Indent

Name: Anonymous 2008-01-29 23:14

Sup /prog/, how do you like your indents?

Tab, 2 spaces, 3 spaces, etc.

Name: Anonymous 2008-01-29 23:15

1 space. NO EXCEPTIONS

Name: Anonymous 2008-01-29 23:27

3 spaces

Name: Anonymous 2008-01-29 23:51

4 spaces, obviously.

Name: Anonymous 2008-01-29 23:59

5 spaces

Name: Anonymous 2008-01-30 0:00

6 spaces

Name: Anonymous 2008-01-30 0:09

3 spaces

Name: Anonymous 2008-01-30 0:59

tab = 4 spaces, yes i use tab, i don't expect anyone else to edit my files but me in my editor with my .vimrc, also indent(1)

Name: Anonymous 2008-01-30 1:16

SICP uses two.

Name: Anonymous 2008-01-30 1:36

Depends on the language. Generally, four spaces.

Name: Anonymous 2008-01-30 3:25

Four spaces. In my Notepad++ configuration I've actually got it setup so that a tab character gets automatically converted to four ASCII whitespaces (0x20). The world would be a better place if other text editors would follow Notepad++'s shining example.

Name: Anonymous 2008-01-30 4:37

(setq lisp-indent-function 'common-lisp-indent-function)

There. 3 spaces after defun, and some other rules.
Also don't use tabs. They will rot you code faster

Name: Anonymous 2008-01-30 5:10

tab = 8 spaces
indent = 4 spaces

Name: Anonymous 2008-01-30 5:39

FUCKING HARD TABS

Name: Anonymous 2008-01-30 5:43

ctrl-shift-f

Name: Anonymous 2008-01-30 6:46

The MASTER PROGRAMMER useth not these things.

Name: Anonymous 2008-01-30 8:28

>>11
Unless you're using COBOL or some other language that breaks on tabs, what possible benefits are there to using spaces for indentation rather than tabs?

Name: Anonymous 2008-01-30 10:01

scheme: 2 spaces
C: tab, like a real one. although that's not what my tabstop is.

Name: Anonymous 2008-01-30 10:08

Two spaces as a indent unit, Allman indent style, spaces over tabs, tab key in EMACS configured to insert four spaces. How indie am I?

Name: Anonymous 2008-01-30 10:21

>>17
What possible benefits are there to using tabs, unless you simply enjoy corrupting your indentation when the code moves around?

Name: Anonymous 2008-01-30 10:34

I use 8 tabs.

Name: Anonymous 2008-01-30 10:34

>>20
it doesn't corrupt at all, i use vim and the :cp or :mov functions to move around code between buffers or through a file and it keeps the indentation

but you probably mean when code moves around to other peoples code, well you can't really fix that, everyone has their own opinion and as long as programming code is written in ascii text files you'll have people using their own style, i mean that's the whole reason indent(1) was written all those many years ago

Name: Anonymous 2008-01-30 10:35

spaces == portability
A-also, spaces do not taint the idea of monospaced font.
And so, life imitates art.

Name: Anonymous 2008-01-30 10:36

>>22
i use vim

Now you have two problems.

Name: Anonymous 2008-01-30 10:39

Have a look at the mplayer source. It has a delicate mix of both tabs and spaces

Name: Anonymous 2008-01-30 11:28

>>25
Look at Wine for a not-so-delicate mix ;)

Name: Anonymous 2008-01-30 11:45

>>26
I was being sarcastic about the mplayer source

Name: Anonymous 2008-01-30 13:24

>>22
Are you too stupid to realize that I'm not too stupid to realize what I myself meant by "corruption of the indentation"? Don't you tell me there's no such thing! What happens when some poor sap has to read your code that uses tabs for no good reason? His 7 space tab stop (don't ask) will not even pretend to play nicely with your "happy medium" five-and-a-half space tab setting, and it will run over 80 columns, and everyone will have a bad day. If you'd just made it explicit with spaces there would be no problem. Your code would be stupid looking but readable with no issues. Are you just hoping that no one will ever read your code? Because that's what I'm doing.

Name: Anonymous 2008-01-30 13:31

>>28
Why should I care about that 80 column limit. I have a high resolution display capable of rendering up to 120 fixed width characters on a single line.

Name: Anonymous 2008-01-30 13:40

>>29
I'm CEO...Bitch

Name: Anonymous 2008-01-30 13:49

I once wrote a Python program with `ts=8', `sts=4', `sw=4', and `noet'. That was fucking dumb.

Name: Anonymous 2008-01-30 14:10

>>29
That's "high resolution"? I had 160x64 on a 15" CRT back in the mid 90s.

Name: Anonymous 2008-01-30 14:33

>>29
Not everyone has the cash for fancy hardware like yours. Maybe someday when computer screens are a thousand of pixels wide (yeah, right) we can give up on 80 columns, but not before.

Name: Anonymous 2008-01-30 14:45

>>32
Enjoy your tiny font, I have 145 columns with 1600x1200.

Name: Anonymous 2008-01-30 15:43

>>28
again, indent(1)

and i'm sure there are similar programs or functions on windows or various graphical ide's that you wintendo fags use

Name: Anonymous 2008-01-30 16:16

>>35
So I'm supposed to reformat your stupid code just to read it? No thanks, faggot. Just format it so it looks right, see? I'll change the formatting when and if I actually need it to blend in with something else.

Name: Anonymous 2008-01-30 16:21

>>28
Any faggot still insisting on 80-character lines can go fuck himself and manually adjust his tab width to fit his display, while the rest of us get on with the business of not living in the '60s.
With tabs, each programmer can adjust the width to his own personal taste. With spaces, you're stuck using whatever the idiot before you thought was a good indentation.

Name: Anonymous 2008-01-30 16:55

>>37
With tabs you're stuck coping with the unfortunate aftermath of whatever the idiot before you thought was good indentation. With spaces, at least it appears as intended.

Name: Anonymous 2008-01-30 17:05

>>37
There are code autoformatters that'll take completely unindented and free-of-whitespace code and clean it up.

If you're using FIOC, well, tough luck.

Name: Anonymous 2008-01-30 17:08

>>38
Haskell/python fag vs the world.
tabs > spaces.
Only someone using a language where spaces matter would support spaces.
eg, python or whitespace.
so, shut the fuck up about spaces better than tabs. they are not and you suck dick along with your language.

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