picom icon indicating copy to clipboard operation
picom copied to clipboard

`typedef`s in picom use suffix `_t` which is reserved by POSIX

Open yshui opened this issue 1 year ago • 0 comments

You can find many such typedefs throughout picom, which is probably a bad idea. Because these names are reserved by POSIX

Simply dropping the _t suffix is not a good idea either, because it's difficult to tell what a name is, for example:

    image_handle *a;

This could be "multiple variable image_handle with variable a, throw away the result", or "define variable a with type image_handle*". And it's also possible to have the same name to be either a type or a variable in different parts of the codebase.

So we must come up with a naming scheme so that typedefs and variables are named differently. I would suggest CamelCase. (structs, enums are not affected by this since they aren't ambiguous).

yshui avatar Apr 07 '24 21:04 yshui