|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [RFC 0/7] Introduce hard dependency on glib |
Date: | Tue, 25 Jan 2011 11:48:35 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10 |
On 01/25/2011 08:48 AM, Stefano Stabellini wrote:
On Tue, 25 Jan 2011, Gerd Hoffmann wrote:I've spent the past few months working on C++ integration for QEMU. I'm more convinced than ever that we desperately in need of structured object oriented mechanisms to be successful but am pretty strongly convinced that incremental additional of C++ is not going to be successful.Agree. I doubt switching to C++ will fly. But using glib has pretty good chances to be a big success long-term.Why is everyone so pessimistic on switching to C++? Anthony: considering that you have direct experience on trying to do this, why are you convinced it is not going to work?
I'm not ruling out C++ altogether but at this stage, I can't see an incremental transition to C++ working all that well.
I tried to isolate the device models and have a well defined interface between the C and C++ code but the trouble is that if you want the C++ side of things to be Good C++ code, you end up having to replace large chunks of QEMU code.
It's possible that I just took the wrong approach.My end goal is not C++, it's to improve the device model. I haven't tried doing it with GObject yet but before we even get there, there's a lot of good we can do with glib.
Regards, Anthony Liguori
I am asking because I have always found the glib GObject stuff a little ugly compared to well written C++ code (of course you can write ugly code in any language if you want to).
[Prev in Thread] | Current Thread | [Next in Thread] |