All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk>
To: harry <harry@hebutterworth.freeserve.co.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: USB virt 2.6 split driver patch series
Date: Mon, 21 Nov 2005 15:27:28 +0100	[thread overview]
Message-ID: <20051121142727.GB25045@snarc.org> (raw)
In-Reply-To: <1132581661.31295.134.camel@localhost.localdomain>

On Mon, Nov 21, 2005 at 02:01:01PM +0000, harry wrote:
> I have read  Documentation/CodingStyle quite carefully and there is no 
> mention of using braces inside functions.  I'm used to using braces to
> define minimal scopes for local variables which makes the code easier to
> read by minimising the number of variables you need to keep track of
> when reading it and by declaring variables closer to where they are used
> so it is easier to verify that they have been correctly initialised.
> 
> Is this really banned?

most of the time yes.

the only "good" use of anonymous functions are:

- conditional code, to keep variable definition with the code that
  use it, to prevent "variable not use" warnings.
- modifying some old code ..
   (but most of the time a static inline function is way better,
    unless you are using lots of variable from the function)

plus you'll save lots of blanks at the left of the code and lots of
lines, not using them.

-- 
Vincent Hanquez

  reply	other threads:[~2005-11-21 14:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-21 13:18 USB virt 2.6 split driver patch series harry
2005-11-21 13:49 ` Vincent Hanquez
2005-11-21 14:01   ` harry
2005-11-21 14:27     ` Vincent Hanquez [this message]
2005-11-21 14:29     ` Dave Feustel
2005-11-21 14:41     ` NAHieu
2005-11-21 15:14       ` harry
2005-11-21 15:27         ` NAHieu
2005-11-21 15:39           ` harry
2005-11-21 17:02             ` NAHieu
2005-11-21 17:17               ` harry
2005-11-22  1:59                 ` NAHieu
2005-11-22  2:00                   ` NAHieu
2005-11-22 10:24                     ` harry
2005-11-22 11:07                       ` Vincent Hanquez
2005-11-22 15:37                         ` Anthony Liguori
2005-11-22 20:27                           ` Vincent Hanquez
2005-11-21 15:44         ` Muli Ben-Yehuda
2005-11-21 18:49           ` Harry Butterworth
2005-11-21 18:58             ` Muli Ben-Yehuda
2005-11-25 19:16           ` harry
2005-11-21 17:26     ` Oleg Goldshmidt
2005-11-21 15:34       ` harry
2005-11-21 14:25   ` Dave Feustel
2005-11-21 14:36     ` Vincent Hanquez
2005-11-21 15:24       ` Dave Feustel
2005-11-21 16:03         ` Vincent Hanquez
2005-11-21 16:30           ` Dave Feustel

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=20051121142727.GB25045@snarc.org \
    --to=vincent.hanquez@cl.cam.ac.uk \
    --cc=harry@hebutterworth.freeserve.co.uk \
    --cc=xen-devel@lists.xensource.com \
    /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.