Re: New filesystem for Linux

From: Jan Engelhardt
Date: Sun Nov 05 2006 - 06:33:07 EST



>> BTW do you find uppercase typedefs like
>> typedef struct {
>> ...
>> } SPADFNODE;
>> confusing too?
>
>Yes for the reason above. Also, we don't much use type definitions for
>structures, because it's easier to understand "struct spadfnode *node"
>in a function declaration than "SPADFNODE *node".

It gets worse when code authors begin to use

typedef struct { ... } MYSTRUCT, *PMYSTRUCT, **PPMYSTRUCT;

Most certainly you will run into "passing argument from incompatible
pointer"[1] and "request for member âaâ in something not a structure or
union"[2] and "invalid type argument of â->â"[3] (BTW I hate gcc using
Unicode chars in its output which are not displayed in the console):

struct foo {
int bar;
} ST, *PST;
void foobar(ST a) { // [1]
a->bar = 1;
foobar2(a); // [3]
}
void foobar2(PST a) { // [2]
a.bar = 1;
}

So I much rather like to see all the 'funky stars' (struct foo *) in the
parameter list, instead of trying to keep track of how many of them a
PST carries.



-`J'
--