All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Michael Witten <mfwitten@gmail.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Tabs and spaces (Re: [RFC 0/5] Date Mode: Add --time-zone; deprecate --date=local)
Date: Wed, 20 Apr 2011 19:07:01 -0500	[thread overview]
Message-ID: <20110421000701.GA10987@elie> (raw)
In-Reply-To: <d74e95d4-ef16-42fb-ae8f-b1d7a8b9d91e-mfwitten@gmail.com>

Hi Michael,

Michael Witten wrote:

> and I'm also responsible for this massive git flamewar of yore on the same
> subject:
> 
>   http://article.gmane.org/gmane.comp.version-control.git/61095
>   Message-ID: 634393B0-734A-4884-93E3-42F7D3CB157F@mit.edu

Heh. :)

> However - and this is the key point - if you are going to be mixing
> tabs and spaces ANYWAY, then you might as well do it in a way that
> maintains alignment within a tab level regardless of the current
> setting for the tabwidth:

In principle, I generally agree.  But as mentioned in the thread you
reference, most text editors don't make that very easy.

I personally use a tabwidth of 6 when I really want to concentrate on
reading.  When coding in a rush for other people, that leads to using
tabstop of 8 and only aligning text that is much shorter than one tab:

	if (foo && bar && baz &&
	    qux && quux) {
		...
	} else if (quuux(quuuux, quuuuux,
				long_expresion_comes_here(quuuuuux))) {
		...
	}

As you can see, this is following the "put continuation lines near the
right margin" convention advocated in linux-2.6's
Documentation/CodingStyle.

Two advantages:

 - looks sensible with any tabstop
 - no need to cascade changes on following lines when the width of a
   function name changes

One major disadvantage:

 - annoys people who like everything nicely lined up.

For what it's worth.  (Not much, of course --- the best rule is as
always to make sure your code fits well with the code around it.)

Hope that helps,
Jonathan

  reply	other threads:[~2011-04-21  0:07 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20  2:53 [RFC 0/5] Date Mode: Add --time-zone; deprecate --date=local Michael Witten
2011-04-20  2:45 ` [RFC 1/5] Light refactoring of date infrastructure Michael Witten
2011-04-20  2:45 ` [RFC 2/5] Pretty Print: show tz when using DATE_LOCAL Michael Witten
2011-04-21 22:34   ` Junio C Hamano
2011-04-22 14:08     ` Dates in Commits and other issues of style (Re: [RFC 2/5] Pretty Print: show tz when using DATE_LOCAL) Michael Witten
2011-04-25  1:26       ` Miles Bader
2011-04-25  3:57         ` Junio C Hamano
2011-04-25 10:45           ` Jakub Narebski
2011-04-25 18:29             ` Junio C Hamano
2011-04-22 14:36     ` [RFC 2/5] Pretty Print: show tz when using DATE_LOCAL Michael Witten
2011-04-22 15:06       ` Junio C Hamano
2011-04-20  2:45 ` [RFC 3/5] Date Mode: Implementation Michael Witten
2011-04-21 22:44   ` Junio C Hamano
2011-04-20  2:45 ` [RFC 4/5] Date Mode: Documentation Michael Witten
2011-04-20  2:45 ` [RFC 5/5] Date Mode: Tests Michael Witten
2011-04-21 22:44   ` Junio C Hamano
2011-04-23  3:42     ` Michael Witten
2011-04-23  5:06       ` Michael Witten
2011-04-23  3:45     ` Time zone option name (Re: [RFC 5/5] Date Mode: Tests) Michael Witten
2011-04-23  5:27       ` Junio C Hamano
2011-04-23  3:59   ` [RFC 5/5] Date Mode: Tests Michael Witten
2011-04-20  6:43 ` [RFC 0/5] Date Mode: Add --time-zone; deprecate --date=local Jeff King
2011-04-20 14:21   ` Michael Witten
2011-04-21  1:50     ` Junio C Hamano
2011-04-21  2:14       ` Michael Witten
2011-04-21  3:57         ` Junio C Hamano
2011-04-21  4:09           ` Michael Witten
2011-04-20 14:22   ` Michael Witten
2011-04-20 14:22   ` Michael Witten
2011-04-20 14:23   ` Michael Witten
2011-04-21  0:07     ` Jonathan Nieder [this message]
2011-04-21  1:51       ` Tabs and spaces Michael Witten
2011-04-21  2:18         ` Jonathan Nieder
2011-04-21  3:15           ` Michael Witten
2011-04-21  3:25             ` Thiago Farina
2011-04-21 10:46               ` Alex Riesen
2011-04-21 12:57                 ` Michael Witten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110421000701.GA10987@elie \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mfwitten@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.