Off Topic > Off Topic

Programming Megathread

Pages: << < (75/241) > >>

Pecon:

I can see converting to spaces for posting the code on forums or whatever, but for actually doing development I find that seeing spaces as my indentation is completely aggravating. Tabs just seem more efficient and should align well in any respectable editor.

Foxscotch:


--- Quote from: Pecon on January 26, 2016, 12:25:16 PM ---Tabs just seem more efficient and should align well in any respectable editor.

--- End quote ---
the problem isn't alignment, it's just length. if you use a tab on a line with 75 other characters, the whole line may appear to you as 79 characters long, but someone looking at your code with their tabs set to 8 characters long in a command prompt window won't be able to see the whole line without scrolling or resizing their window
but if you use four spaces, it'll be 79 to everyone, and they can keep their tabs set to 8 without it interfering with reading your code

even microsoft themselves suggest using spaces
"Use the default Code Editor settings (smart indenting, four-character indents, tabs saved as spaces)."

ZSNO:

Honestly, forget you if your screen only supports up to 80 characters in width. It's not the 1990's anymore.
Tabs are better

Pecon:

The only time I'd see you having an 80-width screen is maybe if you're using a Linux server. But even then you should probably be managing it through SSH anyways, which fully supports resizing that terminal to a sane resolution.


I mean as of windows 10 even cmd and powershell support having a full-screen width.

Actual question: Why would you set your tab-width to more than 4? I can't really see any good reason to do that.

Foxscotch:


--- Quote from: ZSNO on January 26, 2016, 12:38:20 PM ---Honestly, forget you if your screen only supports up to 80 characters in width. It's not the 1990's anymore.

--- End quote ---
there are 100 reasons this is completely ridiculous, but most importantly is the fact that command prompt/terminal/console/whatever you wanna call it windows are usually 80 characters wide. I don't know why, but that's how it is, and to my knowledge most people keep it that way. with spaces you can make sure they'll be able to see all of your code without moving to their mouse to resize the window or scroll right. with tabs, you can not

Pages: << < (75/241) > >>

Go to full version