From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jes Sorensen Subject: Re: [PATCH kvm-unit-tests 2/4] Introduce a C++ wrapper for the kvm APIs Date: Wed, 24 Nov 2010 18:03:52 +0100 Message-ID: <4CED4578.8070603@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> <4CED2416.1040102@codemonkey.ws> <20101124154006.GE15111@redhat.com> <4CED344B.3030000@codemonkey.ws> <4CED3FE6.50900@redhat.com> <4CED42FA.8040402@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Alexander Graf , Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11987 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755811Ab0KXRD6 (ORCPT ); Wed, 24 Nov 2010 12:03:58 -0500 In-Reply-To: <4CED42FA.8040402@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On 11/24/10 17:53, Anthony Liguori wrote: > On 11/24/2010 10:40 AM, Jes Sorensen wrote: >> Well the problem is the 10% you are talking about is another 30% loss >> because the code is now practically unreadable, plus you open up the can >> of worms that people will start using some of the totally broken >> features of C++. > > Did you look at my code or Avi's code? Yes I looked at Avi's patch before commenting, it is unreadable! I have no clue what is going on in that code. Random use of :: and which makes no sense whatsoever. > Look at my code and then tell me it's practically unreadable. > > http://git.qemu.org/qemupp.git/tree/test/test-mc146818a.cpp Looked at that, and there is nothing in that file that couldn't been done just as cleanly in pure C. >> Sure you can try hard to make sure they don't sneak in, >> but down the line they will, and at that point the codebase is totally >> ruined. >> >> Avi's unittest code is a perfect example of code that is unreadable for >> a C programmer. Or to quote a smart man 'the code is clear as perl!'. >> So you have now lost or at least crippled half your developer base, >> making it way harder for them to contribute something useful. >> >> This is a big step in the wrong direction :( > > I wouldn't have written the unittest code to use classes or exceptions > at all. I don't think it's a good fit. I don't see qemupp being a good fit either :( Jes