public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: WANG Cong <xiyou.wangcong@gmail.com>
To: Rene Herman <rene.herman@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>, "H. Peter Anvin" <hpa@zytor.com>,
	Jan Engelhardt <jengelh@linux01.gwdg.de>,
	Randy Dunlap <rdunlap@xenotime.net>,
	Al Viro <viro@ftp.linux.org.uk>,
	LKML <linux-kernel@vger.kernel.org>,
	akpm@linux-foundation.org, Pekka Enberg <penberg@cs.helsinki.fi>
Subject: Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
Date: Wed, 6 Jun 2007 12:53:15 +0800	[thread overview]
Message-ID: <20070606045315.GA2379@localhost.localdomain> (raw)
In-Reply-To: <466529DD.90605@gmail.com>

On Tue, Jun 05, 2007 at 11:16:13AM +0200, Rene Herman wrote:
>On 06/05/2007 04:10 AM, WANG Cong wrote:
>
>>On Mon, Jun 04, 2007 at 01:57:51PM -0400, Jeff Garzik wrote:
>
>>>A matter of opinion :)  I tend to think goto is special enough to
>>>warrant column 1 unconditionally.  It is special, so it draws additional
>>>attention over and above case labels.
>>>
>>>I and others have been tripped up when programmers "hide" goto
>>>statements among regular statements.
>>>
>>>IMO goto warrants a big flashing "notice me" sign.
>
>>Hmmm, perhaps.
>>
>>So, it seems that we can reach an agreement. Any other comments or
>>suggestions?
>
>One more -- I absolutely agree with Jeff that goto should stand out as best 
>as possible but I think that's actually more so when they're indented 2 
>columns.
>
>Have been working on a legacy CD-ROM driver lately and puting "out:" labels 
>at 2 spaces started out as a personal style preference of Pekka Enberg (I 
>used to put them at 0) but has grown on me. It makes them clearly fall 
>inside the function, not being aligned at the same level as the next 
> function header, which makes for the "lowest effort visual scan" of all I 
>feel. One is just too little for that, more than 2 is too much...
>
>Here's the last version that was posted:
>
>http://lkml.org/lkml/2007/6/4/50
>
>It gets a little different visually when labels are mostly longer than a 
>simple "out" or "again", or "error" or something like that but if someone's 
>going to try to pin down the label style, I'd like the freedom to have two 
>spaces in front of them...
>
>Rene.

I see. Thank you for your advice. Freedom is a good thing. ;)

>
>P.S: Your message had a Mail-Followup-To set which dropped yourself and 
>turned the others from CCs into TOs. If you can help it, please no header 
>tricks.

Thanks! You are very kind. I will try to fix it!

Regards!


      reply	other threads:[~2007-06-06  4:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-03 14:24 [RFC] Documentation/CodingStyle: Add rules for goto labels WANG Cong
2007-06-03 14:29 ` Al Viro
2007-06-03 14:45   ` Randy Dunlap
2007-06-03 15:35     ` Jeff Garzik
2007-06-04  4:58       ` WANG Cong
2007-06-04  6:59         ` Jeremy Fitzhardinge
2007-06-04  7:51           ` WANG Cong
2007-06-04  8:19           ` [RFC] Documentation/CodingStyle: Add rules for goto labels (-v2) WANG Cong
2007-06-04 18:30             ` Sam Ravnborg
2007-06-04 19:02               ` Jeremy Fitzhardinge
2007-06-05  1:37                 ` WANG Cong
2007-06-10  2:31                   ` Al Viro
2007-06-04 17:27           ` [RFC] Documentation/CodingStyle: Add rules for goto labels H. Peter Anvin
2007-06-04 19:00             ` Jeremy Fitzhardinge
2007-06-04 21:34               ` H. Peter Anvin
2007-06-04 17:27       ` H. Peter Anvin
2007-06-04 17:35         ` Jan Engelhardt
2007-06-04 17:43           ` H. Peter Anvin
2007-06-04 17:54             ` Valdis.Kletnieks
2007-06-04 18:01               ` H. Peter Anvin
2007-06-04 17:57             ` Jeff Garzik
2007-06-05  2:10               ` WANG Cong
2007-06-05  2:12                 ` Jeff Garzik
2007-06-05  2:31                   ` H. Peter Anvin
2007-06-05  7:44                     ` WANG Cong
2007-06-05  9:16                 ` Rene Herman
2007-06-06  4:53                   ` WANG Cong [this message]

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=20070606045315.GA2379@localhost.localdomain \
    --to=xiyou.wangcong@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=jeff@garzik.org \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=rdunlap@xenotime.net \
    --cc=rene.herman@gmail.com \
    --cc=viro@ftp.linux.org.uk \
    /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