public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: chuckw@ieee.org
To: linux-kernel@vger.kernel.org
Subject: Re: Question on coding style in networking code
Date: Sun, 19 Aug 2001 13:11:31 -0400	[thread overview]
Message-ID: <20010819131131.I2388@ieee.org> (raw)
In-Reply-To: <20010819124442.G2388@ieee.org> <Pine.GSO.4.21.0108200046580.1313-100000@weyl.math.psu.edu>
In-Reply-To: <Pine.GSO.4.21.0108200046580.1313-100000@weyl.math.psu.edu>; from viro@math.psu.edu on Mon, Aug 20, 2001 at 12:56:53AM -0400

	Thank you for the reply.

	I absolutely agree that it is much easier to read and figure out what is
going on.  You don't have to keep going back to the struct declaration to
find out what the fields are.  

Thanks again,
Chuck

On Mon, Aug 20, 2001 at 12:56:53AM -0400, Alexander Viro wrote:
> 
> 
> On Sun, 19 Aug 2001 chuckw@ieee.org wrote:
> 
> > 	struct x y = {
> > 		member1: x,
> > 		member2: y,
> > 		member3: z
> > 	};
> > 
> > What is the deal with this?  Does the second way have any advantage over the previous?
> 
> _Much_ easier to grep for. Less pain in the ass when fields are added/removed/
> reordered.
> 
> For anything with many fields (usually method tables) it's more convenient.
> And no, it's not just networking - filesystem-related code, etc. uses it
> all over the place.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2001-08-20  5:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-19 16:44 Question on coding style in networking code chuckw
2001-08-20  4:56 ` Alexander Viro
2001-08-19 17:11   ` chuckw [this message]
2001-08-20 15:51     ` george anzinger

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=20010819131131.I2388@ieee.org \
    --to=chuckw@ieee.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox