[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
Spaces or tabs? How many? I kinda like 2 spaces myself, but
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

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

Thread replies: 25
Thread images: 1
File: 1-lNiy2agvmmdg7ErXrlK8-w.png (59 KB, 661x642) Image search: [Google]
1-lNiy2agvmmdg7ErXrlK8-w.png
59 KB, 661x642
Spaces or tabs? How many?

I kinda like 2 spaces myself, but I use 4 because that's what PEP8 says and I try to keep it consistent between languages.
>>
Anything but tabs is retarded.
>>
>>54566187
>all meme languages
>css as "language"
>>
>>54566187
I use three spaces.
I just like it.
>>
>>54566285
B-but that's not a power of 2!
>>
>>54566250
It's a language. Not a *programming* language though.
>>
4 spaces

But as long as it's consistent it doesn't matter.
>>
>>54566426
inb4 some retard posts html/css is turing complete.
>>
Jesus Christ. Tabs guys. TABS!
>>
>>54566187
I don't get why you'd want 4 spaces instead of tabs. Seems retarded
>>
>>54566187
>JavaScript
>HTML
>CSS
>"languages"
K
>Python
>Ruby
>relevant
K

Either way, anyone who doesn't use tab for indentation purposes is a complete moron and shouldn't touch a keyboard in their lives ever again.
>>
>>54566187
>100 random projects
you have all of github at your disposal. why would you take such a small sample?
>>
>>54566626
Consistency. Tab size is system or editor dependent while spaces are not.
>>
>>54566683
that's why you use tabs

everyone can set their own tab width...
>>
>>54566426
html/css is turing complete, and therefore a programming language.
https://github.com/elitheeli/stupid-machines
>>
>binds tab to insert 2 spaces

What the fuck is the point of using spaces for the people who do this? Just set your tab width to 2 spaces and you're golden.
>>
>>54566227
Spaces make sense for lisps. Since you often put arguments to functions on multiple lines you want them to all start at the same line.

No, making your functions have name length of the form 4n + 2 (for 4 spaces) is not legitimate.
>>
>>54566659
You don't think Javascript is a programming language? Are you retarded?
>>
>>54569287
yes
>>
>>54566227
/thread
/thread
/thread
>>
4 tabs.
>>
>>54569311
html is a "language". so is CSS. it's not a programming language, but it is a contrived way to communicate stuff, which is kind of the definition of "languages".
>>
>>54569014
It literally doesn't matter for lisps, because Emacs enforces the way code should be indented period, and fixing the indentation of a file is literally as easy as opening it up in Emacs and calling reindent on it.

This entire thread is retarded, because either you're arguing that an existing project's coding style should be changed to suit your special snowflake self, or you're arguing that you're too stupid or your editor is too stupid to be able to change indentation styles for a file automatically on read/save.
>>
4 spaces too much
2 spaces is too little
3 spaces just right
>>
>scriptfags
disgusting
Thread replies: 25
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.