HACKER Q&A
📣 xyheme

Is it ok to use CamelCase naming convention in C code base?


Is it ok to use CamelCase naming convention in C code base?


  👤 dusted Accepted Answer ✓
If you think it looks pretty, and it's your code base, then yes.

If it's an existing code base and you're not the sole owner, discuss it with the others.


👤 jjgreen
No, it is not.

👤 zekoyeto
It depends you, my choice is camel case

👤 gregjor
OK with who? No one will force you to use any particular style.

By convention C programmers usually use underscores (snake case). Conventions and idioms have some value -- other programmers can more easily read and understand code when they don't have to translate idiosyncratic style to what they're used to.