Due to the lack of one in the C world, C ++ provides a useful use case for naming its functions:
[[namespace::...]struct::]function
In C, there is nothing like namespaces, but you can just think of them and model them as prefixes shared by related structures. For readability, this helps visually separate the individual naming components. If you like to use underscores in your functions, you can consider two underscores as a separator, otherwise one is possible. (Technically, two underscores can be reserved for implementation, but I have never seen a single implementation identifier, which was not an underscore prefix, imposed a double underscore inside).
Keeping names close to C ++ also helps programmers cover both languages, and translate the code back and forth if necessary. Similarly, C ++ terminology can be accepted: a constructor, a destructor, perhaps a new one and delete (although these names may become incorrect if the C code is ported to C ++, but continues to use free / malloc).
IMHO, consistent and understandable naming saves more trouble than long identifiers, but if something gets pain, look for a localized workaround like a macro, a built-in wrapper function, a function pointer, etc.
source share