|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM |
Date: | Mon, 26 Mar 2012 14:52:17 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120310 Thunderbird/11.0 |
On 03/26/2012 02:44 PM, Jan Kiszka wrote:
On 2012-03-26 21:39, Anthony Liguori wrote:On 03/26/2012 02:37 PM, Jan Kiszka wrote:On 2012-03-26 21:35, Anthony Liguori wrote:Since this is an easily refactorable thing to look at later, I think we should start with extracting the types.My worry is that those three refactorings set bad examples for others. So I'd like to avoid such back and forth if possible.I'm not really worried about it. It's so easier to refactor this later. Why rush it now?You rush changing the current layout, not me. :)No, I'm trying to do incremental changes without boiling the ocean in the process. I think we all are in violent agreement about where we want to end up (as opaque types as possible). I don't want to hold back additional refactoring on doing this right (and it's not just a matter of malloc/free).Either I'm missing it in the code shuffling, or it's not part of this series: Can you point out where more that a forward reference and malloc/free is needed?
Inheritance is the other nasty case.To inherit from a type, you need to have the type definition. This is a pretty common problem with Object systems and the typical solution is PIMPL[1].
So maybe that's the right thing to do here, but that would have a significant affect on the code. That's what I mean by rushing how to handle this. There are multiple possible solutions and they need to be considered.
The problem is purely aesthetic too, so I don't see a rush to fix it. [1] http://c2.com/cgi/wiki?PimplIdiom Regards, Anthony Liguori
Jan
[Prev in Thread] | Current Thread | [Next in Thread] |