Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mt2ZH-0001lK-Aj for qemu-devel@nongnu.org; Wed, 30 Sep 2009 13:02:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mt2ZC-0001d3-KV for qemu-devel@nongnu.org; Wed, 30 Sep 2009 13:02:18 -0400 Received: from [199.232.76.173] (port=50568 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mt2ZC-0001ck-CS for qemu-devel@nongnu.org; Wed, 30 Sep 2009 13:02:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23103) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mt2ZB-0004Ur-OW for qemu-devel@nongnu.org; Wed, 30 Sep 2009 13:02:14 -0400 Subject: Re: [Qemu-devel] Re: CODING_STYLE References: <20090923200635.GA21246@redhat.com> <20090924191121.GB29419@redhat.com> <20090929161115.GA13885@redhat.com> <20090930135142.GA20378@redhat.com> From: Markus Armbruster Date: Wed, 30 Sep 2009 19:02:09 +0200 In-Reply-To: <20090930135142.GA20378@redhat.com> (Michael S. Tsirkin's message of "Wed\, 30 Sep 2009 15\:51\:42 +0200") Message-ID: <87y6nwfjse.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Blue Swirl , qemu-devel@nongnu.org "Michael S. Tsirkin" writes: > On Tue, Sep 29, 2009 at 09:15:04PM +0300, Blue Swirl wrote: >> On Tue, Sep 29, 2009 at 7:11 PM, Michael S. Tsirkin wro= te: >> > On Thu, Sep 24, 2009 at 11:13:38PM +0300, Blue Swirl wrote: >> >> >> As this is not a clean revert anyway, please don't revert the part= changing >> >> >> if (x) >> >> >> =C2=A0y; >> >> >> else >> >> >> =C2=A0z; >> >> >> >> >> >> to >> >> >> >> >> >> if (x) { >> >> >> =C2=A0y; >> >> >> } else { >> >> >> =C2=A0z; >> >> >> } >> >> > >> >> > Did I mention I hate this style? But okay :). >> >> >> >> I'm not a great fan of this either, but this is the CODING_STYLE. >> > >> > Maybe we can all vote to change this? >>=20 >> Actually, I tried to tweak 'indent' to match QEMU style without much suc= cess. >>=20 >> We could also select a new style, like Linux kernel one. I'm also not >> a great fan of that either. But at least 'indent' could be used very >> easily and I think there would be other benefits, like reuse of Git >> hooks, patch checking scripts and Emacs configs. With full 'indent' >> support all sources could be massaged mechanically to make the switch >> less painful. >>=20 >> Then there are K&R and GNU styles, but I like them even less. > > So ... Linux kernel style wins? What do others think? I find certain aspects of QEMU style rather distasteful, too. Linux kernel style is okay. It can push deeply indented code far to the right and over the cliff, though. Some claim the only correct way to format such code is to indent six feet downward and cover with dirt, but that's not always practical. Nevertheless, I'd favor adopting Linux kernel style. The world doesn't need more indentation styles.