[pulseaudio-discuss] Suggested coding style change for functions

David Henningsson david.henningsson at canonical.com
Thu Sep 19 14:26:53 PDT 2013


Our current coding style currently says this:

void function(int foo) {
    bar();
}

I suggest we change it to this:

void function(int foo)
{
    bar();
}

To clarify, this only applies to functions, not to if statements,
structs or anything else.

This is because the latter is more standard: All of the other projects
I've recently worked with (e g Linux kernel, Gnome, FluidSynth) has the
opening brace on a separate line.

Having coding style similar to other projects allow people such as
myself to easier move between projects and focus on what's important:
features and fixing bugs, rather than having to remember several
different coding styles.

Besides, I think our current style is ugly, but I'm not sure that counts
as an argument. :-)

-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list