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





Reply via email to