From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH kvm-unit-tests 2/4] Introduce a C++ wrapper for the kvm APIs Date: Sun, 28 Nov 2010 15:02:18 +0200 Message-ID: <4CF252DA.1050303@redhat.com> References: <1290595933-13122-1-git-send-email-avi@redhat.com> <1290595933-13122-3-git-send-email-avi@redhat.com> <50DD1E97-0ECD-41E6-B6F8-1D78AA4A4876@suse.de> <20101128115921.GB11685@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Graf , Marcelo Tosatti , kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43761 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752437Ab0K1NCZ (ORCPT ); Sun, 28 Nov 2010 08:02:25 -0500 In-Reply-To: <20101128115921.GB11685@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/28/2010 01:59 PM, Michael S. Tsirkin wrote: > > > > > > FWIW, I still disagree with C++ and believe this code to be hardly readable. > > A major issue is existing tools. > > Using C++ would prevent us from using sparce for static code checking. C++ static checking is way better than anything sparse offers. Things like __user are easily done in C++. > We should be adding more annotations instead of throwing existing ones > out. ctags is also broken with C++ which will make it much harder > for me to browse the codebase. C++ does want a good IDE. > C++ support in gdb has some limitations > if you use overloading, exceptions, templates. The example posted here > uses two of these, so it would be harder to debug. I haven't seen issues with overloading or exceptions. Templates are indeed harder to debug, simply because names can become very long. > I also hoped we'll be able to adopt checkpatch at some point for coding > style enforcement, C++ syntax is just too complex for a perl script to > be of any use. Not much of a loss IMO. -- error compiling committee.c: too many arguments to function