Open luckytyphlosion opened 1 year ago
this was actually agreed, I just havent updated the style guide yet, because im lazy and busy
do not typedef enums, refer explicitly to them, PascalCase
No typedef, PascalCase
This issue has had no activity for 60 days and will be marked stale. If there is no further activity, it will be closed in 30 days.
This issue has had no activity for 60 days and will be marked stale. If there is no further activity, it will be closed in 30 days.
There is no consensus whether enums are enums or typedefs.
Case 1: enums are enums, not typedefs
Do not typedef enums
Good:
Bad:
There is no consensus of the casing of enums (when enums are enums and not typedefs).
Option 1: PascalCase
Option 2: alllowercase_t (similar to primitive non-unit typedefs) Note: Primitive unit typedefs are
u8
,u16
,u32
,s8
,s16
,s32
etc....Reference all enums with
enum
in code (this is forced anyway)Good:
Bad (doesn't compile anyway):
Case 2: enums are typedefs
Enum casing should be alllowercase_t
Good:
Bad:
Follow points 1, 2, and 3 of issue #212 (covers typedef struct naming) for the rest of the info