Looking at some old Open Source C codebase (everyone does that, right?) one can notice a weird convention. Procedure names and return types are split on two separate lines:
char *
hello(char *you)
{
// ...
}
Pros of this style are
struct long_struct_name *
Another reason, provided by Žarko Asen over email:
return type, procedure qualifications, template characteristics go on the line above the procedure’s name its easier to distinguish the procedure name from the code when it resides in the beginning of a new line
Relatively obvious cons are:
What I’m about to describe is a well-established synthesis of the two conventions: split and joined. This synthesis is:
This way, procedure prototype is easy to search for (look for .h files),
while the actual procedure source is equally easy to locate (
Not forcing that on anyone, of course. But... does it make any sense now?