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: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH] Document Qemu coding style
Date: Wed, 1 Apr 2009 10:04:10 +0100
User-agent: Mutt/1.4.1i

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 :|




reply via email to

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