qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Document Qemu coding style


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] Document Qemu coding style
Date: Mon, 30 Mar 2009 22:55:58 +0300
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

M. Warner Losh wrote:
In message: <address@hidden>
            Blue Swirl <address@hidden> writes:
: >  +An exception is the opening brace for a function; for reasons of tradition
: >  +and clarity it comes on a line by itself:
: >  +
: >  +    void a_function(void)
: >  +    {
: >  +        do_something();
: >  +    }
: >  +
: >  +Rationale: a consistent (except for functions...) bracing style reduces
: >  +ambiguity and avoids needless churn when lines are added or removed.
: >  +Furthermore, it is the Qemu coding style.
: : No, this is the K&R style. Quoting linux/Documentation/CodingStyle: : : Heretic people all over the world have claimed that this inconsistency
: is ...  well ...  inconsistent, but all right-thinking people know that
: (a) K&R are _right_ and (b) K&R are right.  Besides, functions are
: special anyway (you can't nest them in C).

And besides, there's lots of almost-smart tools that operate on source
code that know this is always true...  Or at least historically that's
been the case, don't know of any widely used ones today, but I doubt
they were all fixed...

Relax, no one wants to change this...

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]