From: Cyrill Gorcunov <gorcunov@gmail.com>
To: "Kok, Auke" <auke-jan.h.kok@intel.com>
Cc: Jan Engelhardt <jengelh@computergmbh.de>,
Cyrill Gorcunov <gorcunov@gmail.com>,
Randy Dunlap <randy.dunlap@oracle.com>,
Chris Friesen <cfriesen@nortel.com>,
dave young <hidave.darkstar@gmail.com>, Willy Tarreau <w@1wt.eu>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: coding style
Date: Fri, 15 Jun 2007 23:49:14 +0400 [thread overview]
Message-ID: <20070615194914.GF8151@cvg> (raw)
In-Reply-To: <4672EC53.50409@intel.com>
[Kok, Auke - Fri, Jun 15, 2007 at 12:45:23PM -0700]
| Jan Engelhardt wrote:
| >On Jun 15 2007 12:21, Kok, Auke wrote:
| >>Cyrill Gorcunov wrote:
| >>>[Jan Engelhardt - Fri, Jun 15, 2007 at 09:10:49PM +0200]
| >>>| On Jun 15 2007 11:03, Randy Dunlap wrote:
| >>>| > >
| >>>| > > "use tabs for indents and spaces for alignment"
| >>>| > >
| >>>| > > If that means you need to use two dozen spaces, then so be it.
| >>>| >
| >>>| >I don't think that's what that rule means, but I didn't write it,
| >>>| >so I'm not absolutely sure about it.
| >>>| >
| >>>| >but we know that tab stops are every 8th character, not 4 :)
| >>>|
| >>>| Hardly.
| >>>|
| >>>Jan, as I see from CodingStyle:
| >>>
| >>> "Tabs are 8 characters, and thus indentations are also 8 characters."
| >>>
| >>>Actually it would be perfect to get strict rules also for math. and log.
| >>>operators being splitted on several lines:
| >>this doesn't say anything about alignment, which was his point :)
| >
| >Well tabs should _never_ be assumed to be 8, and in this regard, as I
| >see it, CodingStyle has a bug. Tabs are there so that the user can set
| >their width according to _their_ taste, simply so that both sides,
| >
| > from CodingStyle:
| > Tabs are 8 characters, and thus indentations are also 8
| > characters. There are heretic movements that try to make
| > indentations 4 (or even 2!) characters deep, and that is akin
| > to trying to define the value of PI to be 3.
|
| again, this is about *indentation* and not about alignment
|
| >Linus (did he wrote that part?) and the heretics both can have their fun
| >without impacting each other. If we wanted to force the user to have
| >exactly 8 screen blanks, we should use spaces throughout.
|
| Linus was friendly enough to give us permission to use tabs. He forces tabs
| for indentation, but leaves it up to everyone else to (1) set their editor
| to show tabs as 2 or 4 or whatever, and (2) use spaces for alignment.
|
| the bottom line here is that we encourage everyone to use tabs=8, and allow
| some degree of freedom for some people to vary this *AND* have decent
| looking alignment for *EVERYONE* by allowing them to use spaces for
| alignment.
|
| Nothing in the codingstyle document confirms or denies this, so I will
| assume that it is _allowed_ to use spaces for alignment.
^^^^^^^^^^^^^^^
Actually that is exactly what I was expecting to see. Thanks a lot.
|
| the checkpatch.pl script doesn't disallow spaces for alignment - it is dumb
| enough to complain about more than 8 spaces for alignment.
|
| That is and was the whole point... and worth the addition to CodingStyle
| for me
|
|
| Auke
|
Cyrill
next prev parent reply other threads:[~2007-06-15 19:51 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-14 18:48 coding style Cyrill Gorcunov
2007-06-15 4:51 ` Willy Tarreau
2007-06-15 5:09 ` Kok, Auke
2007-06-15 6:38 ` dave young
2007-06-15 6:47 ` debian developer
2007-06-15 6:54 ` dave young
2007-06-15 9:06 ` Mailing style (was Re: coding style) Bernd Petrovitsch
2007-06-15 9:19 ` debian developer
2007-06-15 9:16 ` coding style Jan Engelhardt
2007-06-15 17:32 ` Cyrill Gorcunov
2007-06-15 17:54 ` Chris Friesen
2007-06-15 18:03 ` Randy Dunlap
2007-06-15 19:10 ` Jan Engelhardt
2007-06-15 19:18 ` Cyrill Gorcunov
2007-06-15 19:21 ` Kok, Auke
2007-06-15 19:29 ` Cyrill Gorcunov
2007-06-15 19:31 ` Jan Engelhardt
2007-06-15 19:41 ` Cyrill Gorcunov
2007-06-15 20:21 ` Linus Torvalds
2007-06-15 20:35 ` Jan Engelhardt
2007-06-16 12:30 ` Stefan Richter
2007-06-15 20:21 ` Jan Engelhardt
2007-06-15 20:39 ` Linus Torvalds
2007-06-16 6:38 ` Jan Engelhardt
2007-06-16 12:40 ` Stefan Richter
2007-06-16 15:49 ` Linus Torvalds
2007-06-19 14:05 ` Mark Lord
2007-06-15 19:45 ` Kok, Auke
2007-06-15 19:49 ` Cyrill Gorcunov [this message]
2007-06-15 20:28 ` Jan Engelhardt
2007-06-15 22:10 ` Randy Dunlap
2007-06-16 12:59 ` please keep the CodingStyle text in check (was Re: coding style) Stefan Richter
2007-06-15 18:05 ` coding style Kok, Auke
2007-06-15 18:22 ` Cyrill Gorcunov
2007-06-16 13:07 ` Stefan Richter
2007-06-16 14:31 ` gorcunov
2007-06-16 17:43 ` Stefan Richter
2007-06-16 18:22 ` Cyrill Gorcunov
2007-06-16 14:22 ` Clifford Wolf
2007-06-15 8:56 ` Krzysztof Halasa
-- strict thread matches above, loose matches on Subject: below --
2001-01-23 15:07 Coding Style Jonathan Earle
2001-01-24 3:23 ` john slee
[not found] <Pine.LNX.4.10.10101192217390.9361-100000@penguin.transmeta .com>
[not found] ` <3A68E309.2540A5E1@purplecoder.com>
2001-01-20 6:29 ` Linus Torvalds
2001-01-20 15:32 ` Anton Altaparmakov
2001-01-21 8:24 ` george anzinger
2001-01-19 17:59 Mark I Manning IV
2001-01-20 0:09 ` David Ford
2001-01-20 1:26 ` John Cavan
2001-01-20 0:46 ` Albert D. Cahalan
2001-01-20 5:34 ` Linus Torvalds
2001-01-21 2:00 ` Matthias Andree
2001-01-22 8:24 ` Ralf Baechle
2001-01-22 22:28 ` Mark I Manning IV
2001-01-23 3:56 ` adrian
2001-01-23 20:05 ` Boris Dragovic
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=20070615194914.GF8151@cvg \
--to=gorcunov@gmail.com \
--cc=auke-jan.h.kok@intel.com \
--cc=cfriesen@nortel.com \
--cc=hidave.darkstar@gmail.com \
--cc=jengelh@computergmbh.de \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=w@1wt.eu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox