From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPvQW-0008Om-BF for qemu-devel@nongnu.org; Thu, 03 May 2012 08:46:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPvQR-0007sz-6W for qemu-devel@nongnu.org; Thu, 03 May 2012 08:46:31 -0400 Received: from e35.co.us.ibm.com ([32.97.110.153]:39668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPvQQ-0007sT-VS for qemu-devel@nongnu.org; Thu, 03 May 2012 08:46:27 -0400 Received: from /spool/local by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 3 May 2012 06:46:21 -0600 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 27B3CC90057 for ; Thu, 3 May 2012 08:45:15 -0400 (EDT) Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q43CjG6Y093910 for ; Thu, 3 May 2012 08:45:16 -0400 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q43Cjrtv019997 for ; Thu, 3 May 2012 06:45:53 -0600 Message-ID: <4FA27DDA.10008@us.ibm.com> Date: Thu, 03 May 2012 07:45:14 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <2474f1d2-b6e2-475b-a45e-2fadf28625e5@zmail13.collab.prod.int.phx2.redhat.com> <4FA19277.2030209@us.ibm.com> <4FA1AC32.8020301@redhat.com> In-Reply-To: <4FA1AC32.8020301@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 11/21] qdev: move bus properties to abstract superclasses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: liwp@linux.vnet.ibm.com, peter maydell , qemu-devel@nongnu.org, afaerber@suse.de On 05/02/2012 04:50 PM, Paolo Bonzini wrote: > Il 02/05/2012 22:00, Anthony Liguori ha scritto: > >> Classes are first class objects and can contain members, but I don't >> know of any system where you actively look at the same field in a >> super class for each class in the hierarchy. That's really trippy. > > Just because it's new to you. Smalltalk has been doing that for 30-odd > years. Ok, I've played around quite a bit with Python now and you are right. But I still don't like what you're proposing. I have two main reasons: 1) I think it's too clever. I understand you disagree and this wouldn't be a sticking point for me but nonetheless, I want to register that compliant :-) 2) If you do introspection in this method, it means that *all* properties have to be registered as static properties to be introspected. That's a blocker for me. We're always going to need to do the object_new() + enumerate + object_delete() trick in order to introspect non-static properties. > Of course the VM has a lot of caching going on, but it's entirely > internal. > >> If we move properties to Object, I'd rather just stick a property >> pointer in TypeInfo and call it a day. I'm not thrilled about it, but >> I feel a lot better about it the above. > > What if we add declarative links or children, for example? Adding more > junk to TypeInfo is not the solution. Yes, I dislike this too. It was a suggestion of a lesser evil although in retrospect, it's not much less of an evil. Regards, Anthony Liguori > > Paolo >