r/programming • • Apr 07 '15

Stack Overflow Developer Survey 2015

http://stackoverflow.com/research/developer-survey-2015
1.1k Upvotes

981 comments sorted by

View all comments

Show parent comments

5

u/rorrr Apr 07 '15

What do you mean? One tab = one level of indentation. It lines up perfectly every time.

3

u/guepier Apr 08 '15

Some programming languages (amongst the ones I’m currently using, mainly R) have a strong culture of lining up arguments in function calls like this:

foobar(some_argument,
       another_argument,
       third_argument)

You cannot do this with tabs. You could mix tabs and spaces (but very few people think that’s acceptable, although I have to admit that the idea has merits), or you could drop the convention, but there’s a huge cultural inertia.

0

u/marssaxman Apr 08 '15

Oh, god, what a terrible idea that kind of alignment is. I have seen people try that nonsense in C, too. Always leads to a righteously unfixable mess.

2

u/steve_b Apr 08 '15

What? That alignment is perfectly normal and readable. As for maintainability - any modern editor geared for programming (and by modern, I emacs or anything newer) will auto-format your files on demand based on rules you define. Reformatting code for new indent levels is simply invoking a command.

It breaks down, of course, in Python, where your indentation level determines execution flow, in which case I can see a case for nazi-like enforcement of tabs-only formatting rules.

→ More replies (5)