All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Dubbs <bruce.dubbs@gmail.com>
To: kerolasa@gmail.com, J William Piggott <elseifthen@gmx.com>
Cc: Ruediger Meier <sweet_f_a@gmx.de>,
	util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 6/6] misc: fix some warnings
Date: Wed, 7 Jun 2017 12:09:51 -0500	[thread overview]
Message-ID: <5938335F.9090108@gmail.com> (raw)
In-Reply-To: <CAG27Bk1W2wbSFoAV70EpWT-2USvmuHV_muC2DODr8ALODTS_ww@mail.gmail.com>

Sami Kerola wrote:
> On 6 June 2017 at 20:17, J William Piggott <elseifthen@gmx.com> wrote:

>> I forgot to mention, the line in question exceeds 80 columns and should
>> be split again (the line changed in last.c wraps now also).
>
> I would say 80 columns is preferred, but we should not be too strict with it.
> Sometimes code does look better when wider, and that's fine.
>
> And the spaces vs tab. Yep, we should prefer tabs but sometimes accidents
> happen. Calling these 'wrong' is too strong. This is yet another preference
> thing, and if someone notices during review spaces where there should be
> tabs then that's a good review commend and should be fixed. But I would
> not go so far that existing whitespaces ought to be fixed without a change
> to code line where they are.
>
> util-linux $ for i in $(find . -name '*.c'); do unexpand $i > $i- ; mv
> $i- $i; done
> util-linux $ git diff --stat

Just to throw in my two cents, tabs in source code cause problems unless 
you have a comment like:

// vim: noai:ts=8:sw=8

and the emacs equivalent.

I spend a lot of effort aligning source code to make it readable. 
Research from the 1980s and early 1990s indicated the best levels of 
indentations for readability and comprehension of source code is between 2 
and 4 spaces.  I personally use 3 characters.

Using tabs with different settings destroys that readability.

IMO, embedded tabs in source code add nothing but problems.  Editors can 
easily substitute the correct number of spaces when you hit the tab key 
and spaces allow the reader to always see the code as the author intended.

However, it is your project and your rules.  I am not asking for a change.

   -- Bruce Dubbs
      linuxfromscratch.org


  reply	other threads:[~2017-06-07 17:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01  1:08 [PATCH 0/6] minor last minute fixes for v2.30 Ruediger Meier
2017-06-01  1:08 ` [PATCH 1/6] tests: grep's short option -A is more portable Ruediger Meier
2017-06-01  1:08 ` [PATCH 2/6] tests: avoid diff of diffs Ruediger Meier
2017-06-01  1:08 ` [PATCH 3/6] build-sys: fix library order when linking Ruediger Meier
2017-06-01  1:08 ` [PATCH 4/6] tests: use stdbuf when stderr and stdout is randomly ordered Ruediger Meier
2017-06-01  1:08 ` [PATCH 5/6] tests: handle non glibc error message for fallocate Ruediger Meier
2017-06-01  1:08 ` [PATCH 6/6] misc: fix some warnings Ruediger Meier
2017-06-01 18:50   ` J William Piggott
2017-06-06  8:10     ` Ruediger Meier
2017-06-06 18:18       ` J William Piggott
2017-06-06 19:17         ` J William Piggott
2017-06-07 15:27           ` Sami Kerola
2017-06-07 17:09             ` Bruce Dubbs [this message]
2017-06-07 23:39               ` Ruediger Meier
2017-06-08  5:26               ` Bernhard Voelker
2017-06-01  7:52 ` [PATCH 0/6] minor last minute fixes for v2.30 Ruediger Meier
2017-06-01  8:55   ` Karel Zak
2017-06-01  9:15     ` Ruediger Meier
2017-06-01 10:32       ` Karel Zak

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=5938335F.9090108@gmail.com \
    --to=bruce.dubbs@gmail.com \
    --cc=elseifthen@gmx.com \
    --cc=kerolasa@gmail.com \
    --cc=sweet_f_a@gmx.de \
    --cc=util-linux@vger.kernel.org \
    /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.