The great debate

Tabs or spaces?
Perfect indent size?
vim or emacs?

Other urls found in this thread:

users.ece.cmu.edu/~eno/coding/CCodingStandard.html#formatting
theregister.co.uk/Print/2003/09/11/bill_joys_greatest_gift/
github.com/vim/vim/blob/master/runtime/doc/uganda.txt
man.openbsd.org/style
twitter.com/SFWRedditGifs

There exists no sane argument for using spaces for indentation.
Only webdevs who are too retarded to indent properly insist on using spaces. Real programmers like the Linux kernel devs use tabs.

What does stallman use?

The real truth is most programming jobs today involve languages where space-based indenting is more common.

This. No one writes C anymore.

We are still writing software for low resource embedded computers, and also operating systems, and compilers. These are today's C applications for new projects.

python programmers spotted

Everything will be javascript in the future and you can't stop it.

I don't need to stop what doesn't exist.

Nothing, since he does not write code any more.

java bots and DEVOPS make more than freelancers, right?

If you're writing your code for yourself, sure. Almost all projects using tabs fuck up on my screen because I use a different tab width than them.
// vim: expandtab tabstop=4 shiftwidth=4:

SPACES!

spaces
8
GNU emacs

cold hard truth

I graduated at the top of my Javascript programming class, and I don't even know what the tabs button does. It's a remnant of the past, like racism and sexism in the workforce.

Who the fuck uses spaces? I have been taught it all the classes in college to use tabs, I have never seen a single person use spaces. Girls who do webdesign?
users.ece.cmu.edu/~eno/coding/CCodingStandard.html#formatting

Using spaces is the /g/ equivalent of flat earth meme.

The instructor probably expects the students not to be able to handle spaces as it's easier for them to fuck it up because they don't know how to use an editor properly.

Everyone still uses the tabulator key

WTF is a tabulator key?

Spaces because copy paste is predictable. Vim because I need an editor, modal is perfect, and for the rest I use tmux anyway.

Even the vi creator thinks it's shit now that we don't use slow teletypes.

junior college student computer engineer students can't handle spaces?

haha vim btfo

Explain. As long as some retard didn't use spaces for indentation it shouldn't matter what width your editor displays tabs as.

...

Both. Tabs for indentation, spaces for alignment.
3
>vim or emacs?
vim

+ full control over indentation and alignment in a matrix-like display (any monospaced font)
+ looks exactly the same in every computer
- takes up more disk space (but who the fuck cares)
- contributors to a project must configure their editors to use the same amount of spaces

+ just werks, regardless of editor config
- what looks good with one configuration may not look as well aligned with another one
- may not look exactly pretty depending on how you want to align something

+ "ackshully, it's semantically correct"
- unless your editor displays spaces and tabs differently, you may end up fucking up and making it look wonky in other configs
- actually have to spam space like a dumbass whenever you want to align something
- some indent sensitive languages may subtly break HOLY FUCKING SHIT
- copypasting is a fucking oddissey

Why would ANYONE pick anything other than spaces only?

What does this do?

A screen editor wouldn't be usable on a teletype. You would use a LINE editor like ed.
And he didn't say its "shit". He just said the design is the way it is because of having to use a slow modem connected terminal.
theregister.co.uk/Print/2003/09/11/bill_joys_greatest_gift/

Why wouldn't it?
Just use editors with automated alignment
Because their parsers are retarded. Prove me wrong.
What?

For me it doesn't matter how this is stored in files if the editor treats indentation block as a single char. But most don't so for example moving with arrows takes more time. And depending on the font and screen size i may want different indent size.

absolutely DESIGNATED

Because it requires certain types of terminals that may be commonplace now, but they still haven't been configured as the default for most text editors. You can configure your text editor to highlight tabs, but you better have a decent terminal and color scheme. Otherwise, most text editors represent both tabs and spaces as blankspace.
Which text editors do have smart ALIGNMENT and not indentation? Alignment usually requires deep understanding of language semantics, which usually requires integration with beefy linters, which isn't something many editors or languages have. Fuck, some languages' official code conventions are designed with tabs-only in mind and look like shit, and I doubt linters will ever contemplate smart alignment if the language's official conventions say otherwise.

Basically, with spaces only, you can perfectly align something by pressing space once or twice. With tabs, it is impossible and futile, and mixing them, since your tabs are actual tabs, you need to press space a shitload of times snd you only save the keystrokes for current indentation level.
Yeah, but they are still more useful and worth using than your shitty "muh semantics" code conventions.
Eh, no. That is a very basic feature, much more basic than highlighted tabs and intelligent code alignment. Point is, mixing tabs and spaces provides no advantages and a myriad of problems so just don't do that shit.

The correct answer to all code style wars questions.

If you're working for someone else, as part of a team, or part of a project you use the style that's already been established.

If there is no official style established yet defer to the language style guide (i.e. PEP8, Effective Go) or the style guide for the framework or most used library (i.e. Qt Style Guide, Poocoo (Flask) Styleguide).

If there's nothing like this available and you are working with others, consider following the style of a major project in the same language. For instance, if starting a project from scratch in C, try the Linux Kernel style guide, or look at Google's internal style guides. If no language specific style guide is acceptable you must decide collectively. Construct a style guide of simple cases for your chosen language and libraries and put each item to a vote. Allow everyone to vote multiple times (so as to determine what's most agreeable for the whole team). Don't allow arguments to take over the decisions. Don't flip flop on style rules, once the rules are in place try very hard not to change them. If rules must be changed be sure to refactor code to match the new style rule as soon as is convenient.

If you're the dictator of a project, it's perfectly acceptable to just use whatever you feel like at the time. The most important thing is to pick a readable code style and apply it consistently. Never deviate from the style guide unless you're refactoring all code to follow a new pattern.

tl;dr: Follow pre-established styles when working with others, especially on projects you don't own. When none are available or effective pick something the majority of people working working on the project can agree with. Code conistancy and readability are the only things that really matter.

M8, people are using fucking browsers and ides writtent in java nowdays.
Their smart identation is just inserting multiple spaces, they don't treat them as a single char when you going though them.
So why would i care about this shitty languages while using others? There are also preparsers for that, i can write as i like and then replace for the interpreter.
Never saw this working when deleting an endline. This actually forses for additional clicks like ctrl or holding del.
Customizable size of the ident, which is logicaly a single char.

Actually from this point it's reasonable to store tabs coz you can easily convert them to spaces, while converting spaces to tabs could fuck up alignment.

Spaces are better in every way...
Example:
1. Spaces are better
2. Tabs are horrible
Is this really an argument people have?
Emacs is not de wey
Vim is de wey

Just do whatever the style guide tells you to do, you fucking autists.

You do realize that almost all styling guides make you indent with tabs and align with spaces for shit like parameter lists, right?

Sets your tab key to enter 4 spaces, and makes > shift 4 spaces at a time. You can either directly add it to your vimrc as "set expandtab tabstop=4 shiftwidth=4", or add that as a comment to somewhere in the file (typically the header).

>>>/facebook/
This is clearly hard for you, Norman. Please, stop thinking too hard.

OK I'll modify that line
Is fast, I always know what I'm doing and I don't need spastic C-M-whatever to simple things like copy paste

you can't make this shit up

why exactly is vim donating to niggers in uganda?

github.com/vim/vim/blob/master/runtime/doc/uganda.txt
They additionally say to help / donate when you open up the editor without a file, aka on the main screen.

but why?

soy

why?

I nearly killed myself when I saw the niggers plastered all over the homepage. It's fucking insane that they'd shunt all the development money to fucking niggers. He has some retarded license, too. He'll probably hand it over to the Ugandan people when he dies as one last fuck you.

I need a Vim clone stat.

I think he still maintains RMAIL in emacs. He's pretty much the only person to use it though.

The most important reason vi is modal is that Bill Joy never thought of making it modeless. It just didn't occur to him.

Well, modal editing is superior anyways

no??

I personally just use the vi in openbsd base. But I have tried vis and its pretty good and also way faster to load then vim ever was.

Nice adhom, but it doesn't change the fact that tab indent+space align is fucking cancer and the proponents should be gassed.

Why not both
man.openbsd.org/style
knf master race.

tabs take less space you ignorant millenials

fuck off webcuck

yes???

ummm no????

What kind of subhuman does that?

Have fun wasting bytes on something that doesn't affect execution at all.

Tabs for indentation, spaces for alignment
One tab. I don't give a shit about your tab size, set it to whatever you want (+1 for tabs). I use 4 for the most part, but also 2 for languages with lots of indentation levels (like HTML)
Neovim

disgust.jpg

I don't care as long as the nogs in question stay in Uganda.

no u

not on my screen :^)

inb4 rei or asuka

Rei is obviously for the beta males.

tabs to indent, spaces to align.
tab size: 4 spaces, not too narrow as to essentially make indentation moot and not too wide as to become too heavyhanded for small fonts and wide screens.
shitty thread.

this.
rei has no personality and is basically a doll so betas flock to her
asuka is for chads who know how keep a girl in line

Pajeets don't write good software either.

Quite right.

This.

You are mostly right, but a different types of beta males look at a clearly volatile female like asuka and make excuses, because they see her instability as a way to make up for their own lack of personality and assertiveness. They are subs, basically. Anno included.

A future with Asuka consists only of screaming, punching holes in the walls, beating the shit out of each other, destroying furniture, and having the cops called every other night while the kids cry themselves to sleep listening to it.

Thanks, I'm looking at them now.


They could have added some sick features with that money. Made it really really good out of the box. Now it's a blackhole, blacking everything it gets its license around. The longer you support it, and not alternatives, the more it destroys all nice things we could have.

It affects the execution of developers.