From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LowMr-0006lW-1R for qemu-devel@nongnu.org; Wed, 01 Apr 2009 05:04:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LowMm-0006iJ-T5 for qemu-devel@nongnu.org; Wed, 01 Apr 2009 05:04:16 -0400 Received: from [199.232.76.173] (port=33551 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LowMm-0006i4-Kw for qemu-devel@nongnu.org; Wed, 01 Apr 2009 05:04:12 -0400 Received: from mx1.redhat.com ([66.187.233.31]:38624) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LowMm-000427-6D for qemu-devel@nongnu.org; Wed, 01 Apr 2009 05:04:12 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n3194BM8022446 for ; Wed, 1 Apr 2009 05:04:11 -0400 Received: from file.fab.redhat.com (file.fab.redhat.com [10.33.63.6]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3194CJo009764 for ; Wed, 1 Apr 2009 05:04:12 -0400 Received: from file.fab.redhat.com (localhost.localdomain [127.0.0.1]) by file.fab.redhat.com (8.13.1/8.13.1) with ESMTP id n3194Ahe010438 for ; Wed, 1 Apr 2009 10:04:10 +0100 Received: (from berrange@localhost) by file.fab.redhat.com (8.13.1/8.13.1/Submit) id n3194AnX010212 for qemu-devel@nongnu.org; Wed, 1 Apr 2009 10:04:10 +0100 Date: Wed, 1 Apr 2009 10:04:10 +0100 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] [PATCH] Document Qemu coding style Message-ID: <20090401090410.GA29404@redhat.com> References: <49D12392.6040107@redhat.com> <20090330214321.GP3795@csclub.uwaterloo.ca> <20090330.161514.117919654.imp@bsdimp.com> <20090330233853.GT3795@csclub.uwaterloo.ca> <761ea48b0903302259p31b13c76s4c44396b8e33166b@mail.gmail.com> <60cad3f0903310558j554d6906q6f1244fd8a7449aa@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60cad3f0903310558j554d6906q6f1244fd8a7449aa@mail.gmail.com> Reply-To: "Daniel P. Berrange" , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Tue, Mar 31, 2009 at 02:58:50PM +0200, David Turner wrote: > Very frankly, I don't think that a coding style, even strictly applied, is > going to make the QEMU code > easier to understand. > > The real barriers to understanding are the lack of structure in the code, > liberal use of global macros > scattered randomly in the source code, exceedingly liberally named > functions, and sometimes obscure > implementation of simple concepts (*cough* CharDriverState), cramming > totally unrelated stuff in single > largish source files (vl.c for the win !), and a blatant lack of > documentation comments for a lot of subtle > stuff in there to explain the magic. Much of that is true, but there has been very active work addressing these problems in recent times. If you look at the history of vl.c for example, you'll see it has dropped from 10,000 lines to just 5,800 today, with much code split out to separate modules. There's of course much more still todo in this area, but this is no reason to not try and keep a clean & consistent coding style at the same time as this refactoring. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|