I've gone down a rabbit hole of questions about typedef
, tag and struct namespaces, and leading _
being reserved by either the system libraries or the compilers. My question:
What is the best practice for typedef'ing structs?
For example, here are some possibilities:
typedef struct ll_item {...} ll_item;
typedef struct _ll_item {...} ll_item;
typedef struct ll_item {...} ll_item_type;
typedef struct ll_item {...} LLItemType;
Anyone have experience in which is typically used, and most standard? I've seen textbooks use the leading underscore method for the structure name itself (and I would intuitively use that method as well), but could that pollute that namespace if a system struct
uses that name?