|
|
|
|
|
by jstimpfle
1988 days ago
|
|
Second this. These are some of the most annoying syntax warts. Another thing - that probably has no resolution - is the struct-tag thingie. Even after all those years I'm not decided if it's worth typedefing structs to remove the struct tag. Like typedef struct _FooBuffer FooBuffer;
struct _FooBuffer {
...
};
// now we can declare FooBuffer variables without struct tag:
FooBuffer foo;
// had we just declared struct FooBuffer { ... } (without
the typedef), then we would have to do
struct FooBuffer foo;
As almost everybody, for a new language I would not want to have any struct tags.
Even though the argument from the Linux Kernel code style guide makes some sense to me
("don't typedef struct tags away because we want to see it's a struct"). Each struct keyword moves the following code 7 columns to the right, which is annoying in lines where there are 3 or more of them. |
|