qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 11/21] qdev: move bus properties to abstract sup


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 11/21] qdev: move bus properties to abstract superclasses
Date: Thu, 03 May 2012 14:56:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120425 Thunderbird/12.0

Il 03/05/2012 14:45, Anthony Liguori ha scritto:
> 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 :-)

Fair. :)

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

Enumeration without some assistance from the class is impossible anyway
if you go with lazily-created properties for "big" arrays (such as those
you find in interrupt controllers).

Paolo



reply via email to

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