[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
??
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

>>
....?
>>
In a perfect world, tabs. This isn't a perfect world though.
>>
............?
>>
There is not a single good reason for using spaces
>>
........................?
>>
tabulators
stupid question
>>
>>52384883
describes what tab is for
>>
Am I missing something? As far as I know tab is just a shortcut for four spaces.
>>
>>52385557
>0x09 == 0x20202020

No.
>>
>>52384883
tabs when you can
text editor that transcribes tabs <---> spaces for when you have to have spaces like for python and shit
>>
no indentation is the best
>>
I was bullied into 2 spaces by Rubyists.
>>
>>52384883
>he doesn't code in binary
laughingbitches.jpg
>>
Most projects I've been working on adopted spaces instead of tabs for their code convention. I personally hate using spaces though.

Same thing with putting the opening brackets for blocks in a new line instead of the same line.
>>
CamelCaseTbqhFam
>>
>>52385190
there is, because different systems use tabs differently and theres problems (atleast its what ive been told by professor)
>>
>>52384883
Spaces.

Why?

Because I can indent everything how the fuck I want, so fuck you.

Also, you know how fucking annoying it is when I press back space once and it eats 4 spaces?

Fucking Tabfags I swear.
>>
>>52386913
>Because I can indent everything how the fuck I want

With tabs you can (just set the tab width in your text editor).
With spaces you can't when you're working together - then you have to all agree on how many spaces to use.

>how fucking annoying it is when I press back space once and it eats 4 spaces?

You rather press backspace 4 times to unindend a line?

Indentation should be consistent, so you should never add/remove a single space.
>>
>>52386819
I think it boils down to code monkeys being retarded and mixing up tabs and spaces.

Then it becomes easier to just ban tabs altogether.

But in a perfect world where everybody actually follows code conventions I don't see any advantage of spaces over tabs.
>>
VERBOSITY
>>
>>52384883
the only time this becomes a serious issue is in languages with significant whitespace where indentation acts as a block delimiter. such languages are a blight upon programming and must be eradicated.
>>
>>52387477
>such languages are a blight upon programming and must be eradicated.

Hear, hear
>>
Tabs till the first printable char and spaces from there on
So that retards can set their stupid tabwidth to two and things like
Print("im a "
"Retard");
Is still correctly aligned
>>
>>52384883
Objectively, tabs.

Subjectively, I don't give a fuck about your opinion.
>>
>>52386486
in python you can use tabs. You just must not mix tabs and spaces
>>
>>52384883
TABS:
>Single character for multiple spaces = smaller filesize
>Editors can change apparent indent easily
>Cool hackers use them

SPACES:
>Many retarded characters = bloat
>Increasing or decreasing indent becomes less trivial
>Code monkeys use them
>>
>>52386913
>i can indent how the fuck I want
No because if you work with others you must agree on number of spaces, whereas with tabs you just set your tab width in the editor
>>
>>52387552

Feel this negro, because he knows
>>
"As a simple, self-contained example, consider the representation of program structure. Some observers objected to Go's C-like block structure with braces, preferring the use of spaces for indentation, in the style of Python or Haskell. However, we have had extensive experience tracking down build and test failures caused by cross-language builds where a Python snippet embedded in another language, for instance through a SWIG invocation, is subtly and invisibly broken by a change in the indentation of the surrounding code. Our position is therefore that, although spaces for indentation is nice for small programs, it doesn't scale well, and the bigger and more heterogeneous the code base, the more trouble it can cause. It is better to forgo convenience for safety and dependability, so Go has brace-bounded blocks."

Google literally says whitespace is cancerous. Why are you defending whitespace as syntax?
>>
void main(argc, argv)
int argc;
char **argv;
{
TAB_printf("This function is %s to be in %s %d %s.\n",
TAB_ "way too long",
TAB_ "programs which are trying to be under",
TAB_ LINE_WIDTH_MAX,
TAB_ "characters per line"
TAB_ );
}

Tabs for indenting, spaces for formatting.
>>
daily reminder that using tabs is retarded and you should feel embarrased if you use them
>>
>>52388589
wtf is this kill you're selfes
>>
Tabs.
If you do space, you have to decide on an amount of spaces to use.
Do you use 3? 4? 8? 2? Everyone has their own preference, just like text editors, linux distros, and desktop environments.
So with tabs, everyone can set them to whatever they want, and they'll all see the text in their preferred tab width.
The same is possible with spaces in more advanced editors but is generally hacky and obviously will preclude less advanced editors.
>>
>>52389294
All my (Pascalesque) style guides said and say 4 spaces are a tab. I also haven't seen anyone doing something else for a long time. Came in like heresy when I found out there are IDEs that translate a tab to another amount of spaces.
>>
>>52384883
Everyone using spaces instead of tabs is a faggot.
>>
>>52389385
Unix standard for tabs is 8 spaces.
Linux kernel coding guidelines recommend 8-column tabs.
Python is usually 4 spaces.
I've seen 2 and 3 in places.
>>
>>52386450
What? Every text editor I've ever seen literally just inputs four spaces with tab. Pressing tab then pressing backspace leaves you with three spaces. Does the difference happen only on Linux or something?
Thread replies: 38
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.