Re: [PATCH RFC3 09/13] send-email: Remove horrible mix of tabs and spaces

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH RFC3 09/13] send-email: Remove horrible mix of tabs and spaces

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:36

Andreas Ericsson [off-list ref] writes:
Using tabs to align stuff to indentation level and spaces to align
line continuation is the only possible way to let users choose
whichever indentation depth they want while preserving the continuation
alignment.
Sure, it will look aligned with whatever width of HT ">":

	>>if (this is a looong
        >>....expression that is alighed) {
        >>>statement1;
        >>>statement2;
        >>}

but it is *only true* if your SP "." and everything else is of the same
width.

People seem to repeat that without realizing what they are saying, but I
find the assumption the argument is based on quite bogus.  Why do people
think it is only sane to assume flexible HT width but still monospaced
font whose SP, l and w are all of the same width?

You either forget about the alignment (there is no such thing---suck it
up), or use time honored HT=8 and monospace convention.

And this project uses the latter.

Re: [PATCH RFC3 09/13] send-email: Remove horrible mix of tabs and spaces

From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:46:36

Junio C Hamano wrote:
Andreas Ericsson [off-list ref] writes:
quoted
Using tabs to align stuff to indentation level and spaces to align
line continuation is the only possible way to let users choose
whichever indentation depth they want while preserving the continuation
alignment.
Sure, it will look aligned with whatever width of HT ">":

	>>if (this is a looong
        >>....expression that is alighed) {
        >>>statement1;
        >>>statement2;
        >>}

but it is *only true* if your SP "." and everything else is of the same
width.

People seem to repeat that without realizing what they are saying, but I
find the assumption the argument is based on quite bogus.  Why do people
think it is only sane to assume flexible HT width but still monospaced
font whose SP, l and w are all of the same width?
Because 99% of all editors designed for programming use a fixed-width font
by default for precisely that reason, and all others can be set to display
fixed-width fonts without losing much (if any) readability, but indentation
comes in 2*$number_of_programmers variations.

You either forget about the alignment (there is no such thing---suck it
up), or use time honored HT=8 and monospace convention.
Or you use "indent with tabs, align with spaces" and let those who use a
word processor for programming go hang. It's quite common actually. Or
you use some own homecooked style of indentation that's quite obvious
*to you* Either way, a project's founding father always sets the style,
and those who contribute get to either follow it or provide some pretty
strong argument to change it (a lot better than:

"A few of the lines were aligning function arguments via tabs
and a few extra spaces, which is not reliable in my model.

Frankly, I don't like tabs and spaces sharing the same contiguous
block. I don't like it all."

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help