Our coding standards for C include various prefixes for data types, constants, static/global variables, and pointers. These prefixes were originally introduced for code review purposes, but with the convenience of modern IDEs, which provide type information through highlighting, we are questioning whether it is still a best practice to use these prefixes in variable and type names. Additionally, the accumulation of prefixes for pointers can make naming confusing and affect the order of elements in variable names. What are your thoughts on the continued relevance of these prefixes in C programming standards?
Asked
Active
Viewed 52 times
0
-
1Very few people think those are relevant any more. – pjc50 Nov 02 '23 at 12:32
-
Hungarian notation is pretty irrelevant, but putting the library name into every symbol name remains important if that symbol has "linkage" (is not static). Otherwise, there might be name collisions. – amon Nov 02 '23 at 15:39
-
Not the Hungarian notation question itself but the answers and the discussion might be relevant. – Cem Polat Nov 11 '23 at 11:57