[Top][All Lists]
[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
- [Qemu-devel] [PATCH 18/21] qdev: convert busses to QEMU Object Model, (continued)
[Qemu-devel] [PATCH 16/21] qdev: use wrapper for qdev_get_path, Paolo Bonzini, 2012/05/02
[Qemu-devel] [PATCH 20/21] qbus: make child devices links, Paolo Bonzini, 2012/05/02
[Qemu-devel] [PATCH 12/21] pc: add back PCI.rombar compat property, Paolo Bonzini, 2012/05/02
Re: [Qemu-devel] [PATCH 00/21] qbus QOM conversion, rebased on top of my patches, Paolo Bonzini, 2012/05/04
Re: [Qemu-devel] [PATCH 00/21] qbus QOM conversion, rebased on top of my patches, Paolo Bonzini, 2012/05/23