Which do you prefer for code that doesn't really have a dedicated style (e.g., I've never seen underscores used in Java) I notice that most of the FreeBSD source uses underscores, although that is probably a by-product of being written in C.
Here's my 2 cents:
1. For embedded stuff, all underscores, no exceptions. typedef structs postfixed with a "_t":
2. For "big computer" (i386 etc) programs written in C, I write typedef's in camel case, everything else underscores:
3. For anything else, I probably just follow the existing style (although I'll tend toward underscores if allowed )
What do other people think?
Here's my 2 cents:
1. For embedded stuff, all underscores, no exceptions. typedef structs postfixed with a "_t":
2. For "big computer" (i386 etc) programs written in C, I write typedef's in camel case, everything else underscores:
3. For anything else, I probably just follow the existing style (although I'll tend toward underscores if allowed )
What do other people think?