On Tue, Jul 11, 2023 at 10:17:24 +0000, Taylor R Campbell wrote:

> I propose the attached change to KNF style(5) to advise against
> typedefs for structs or unions, or pointers to them.
[...]
> (Typedefs for integer, function, and function pointer types are not
> covered by this advice.)

Yes, please.

Typedefs make sense when the type is *really* opaque and can, behind
the scenes, be an integer type, a pointer or a struct.  [Ab]using
typedefs to save 8 bytes of "struct " + "*" just adds cognitive load
(and whatever logistical complications that you have enumerated in the
elided part of the quote).

-uwe

Reply via email to