From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LodYV-0002r7-OA for qemu-devel@nongnu.org; Tue, 31 Mar 2009 08:59:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LodYP-0002ko-63 for qemu-devel@nongnu.org; Tue, 31 Mar 2009 08:59:01 -0400 Received: from [199.232.76.173] (port=38277 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LodYO-0002kc-Jv for qemu-devel@nongnu.org; Tue, 31 Mar 2009 08:58:56 -0400 Received: from smtp-out.google.com ([216.239.45.13]:55336) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LodYN-0007Jn-Vm for qemu-devel@nongnu.org; Tue, 31 Mar 2009 08:58:56 -0400 Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id n2VCwphk003036 for ; Tue, 31 Mar 2009 05:58:52 -0700 Received: from yw-out-2324.google.com (ywe9.prod.google.com [10.192.5.9]) by wpaz33.hot.corp.google.com with ESMTP id n2VCwoXp012749 for ; Tue, 31 Mar 2009 05:58:50 -0700 Received: by yw-out-2324.google.com with SMTP id 9so1689847ywe.9 for ; Tue, 31 Mar 2009 05:58:50 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <761ea48b0903302259p31b13c76s4c44396b8e33166b@mail.gmail.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> Date: Tue, 31 Mar 2009 14:58:50 +0200 Message-ID: <60cad3f0903310558j554d6906q6f1244fd8a7449aa@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH] Document Qemu coding style From: David Turner Content-Type: multipart/alternative; boundary=000e0cd6a95ca76bbb046669c2b8 Reply-To: 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 --000e0cd6a95ca76bbb046669c2b8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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. Braces and indentation are sometimes annoying, but frankly these are such minor issues I wonder why people waste their time venting about them given the source code's state. On Tue, Mar 31, 2009 at 7:59 AM, Laurent Desnogues < laurent.desnogues@gmail.com> wrote: > On Tue, Mar 31, 2009 at 12:38 AM, Lennart Sorensen > wrote: > > On Mon, Mar 30, 2009 at 04:15:14PM -0600, M. Warner Losh wrote: > >> With editors like emacs, this isn't an issue. > > > > Who gives a @#$ what emacs does. > > Ha at last! vi was put in the original document, then someone mentions > emacs and then some insults. This finally becomes interesting. > > > Laurent > > > --000e0cd6a95ca76bbb046669c2b8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 ba= rriers to understanding are the lack of structure in the code, liberal use = of global macros
scattered randomly in the source code, exceedingly liberally named function= s, and sometimes obscure
implementation of simple concepts (*cough* Char= DriverState), cramming totally unrelated stuff in single
largish source = files (vl.c for the win !), and a blatant lack of documentation comments fo= r a lot of subtle
stuff in there to explain the magic.

Braces and indentation are some= times annoying, but frankly these are such minor issues I wonder
why peo= ple waste their time venting about them given the source code's state.<= br>
On Tue, Mar 31, 2009 at 7:59 AM, Laurent Des= nogues <laurent.desnogues@gmail.com> wrote:
On Tue, Mar 31, 2009 at 12:38 AM, Lennart Sorensen
<lsorense@csclub.uwaterl= oo.ca> wrote:
> On Mon, Mar 30, 2009 at 04:15:14PM -0600, M. Warner Losh wrote:
>> With editors like emacs, this isn't an issue.
>
> Who gives a @#$ what emacs does.

Ha at last! =A0vi was put in the original document, then someone ment= ions
emacs and then some insults. =A0This finally becomes interesting.


Laurent



--000e0cd6a95ca76bbb046669c2b8--