Re: New filesystem for Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> 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'
-- 

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux