From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq3nU-00022Q-Vc for qemu-devel@nongnu.org; Wed, 25 Jan 2012 09:26:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rq3nQ-0004EM-Fu for qemu-devel@nongnu.org; Wed, 25 Jan 2012 09:26:00 -0500 Message-ID: <4F2010EE.5000108@codemonkey.ws> Date: Wed, 25 Jan 2012 08:25:50 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1327433600-7403-1-git-send-email-aliguori@us.ibm.com> <1327433600-7403-28-git-send-email-aliguori@us.ibm.com> <4F1F0E2D.2020706@web.de> <4F1F12E7.2020309@us.ibm.com> <4F1F1C28.4040600@web.de> <4F1F1E91.50609@codemonkey.ws> <4F1F233B.8040804@web.de> <4F1F2875.3050509@codemonkey.ws> <4F1F2B77.2020703@web.de> <4F1F38B6.7000506@codemonkey.ws> <4F1FBE64.2010109@suse.de> In-Reply-To: <4F1FBE64.2010109@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: Peter Maydell , "Michael S. Tsirkin" , Alexander Graf , qemu-devel@nongnu.org, Blue Swirl , Jan Kiszka , Paul Brook , qemu-ppc@nongnu.org, Aurelien Jarno , Gerd Hoffmann On 01/25/2012 02:33 AM, Andreas Färber wrote: > Am 25.01.2012 00:03, schrieb Anthony Liguori: >> On 01/24/2012 04:06 PM, Jan Kiszka wrote: >>> On 2012-01-24 22:53, Anthony Liguori wrote: >>>> But I don't like this. The problem is that the declarative syntax we >>>> have doesn't distinguish between "not-specified" and >>>> "zero-initialized". >>> >>> That's surely solvable. >> >> Please try :-) >> >> I've spent a good chunk of time mulling this over and could not find an >> acceptable solution. I think the same is true for the GObject folks. >> >> There is a declarative solution for this that I know of, a C++ class >> definition ;-) > > So what's the reason not to go with one of the object-oriented, > C-compatible languages GCC supports, like C++ or Objective-C/C++? > (Objective-C has native reflection capabilities fwiw.) I actually prefer C++ but much in the same fashion that I prefer 8-space indenting. I think it's objectively better, but not significantly better enough to warrant the disruption of introducing it. C++ makes polymorphism easier and declaring classes a little nicer, but it doesn't help significantly with factories, properties, or introspection. Polymorphism in C is mostly a one-time cost so once you have the infrastructure (object.c), it's not really that bad. Regards, Anthony Liguori > > Personally I disliked those trivial mini init functions in the initial > 2/4 series, too, but I don't really mind an imperative approach either. > > Andreas