lkml.org 
[lkml]   [2001]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question on coding style in networking code


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/

\
 
 \ /
  Last update: 2005-03-22 12:57    [W:0.054 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site