On 12/01/2017 11:03 AM, Paolo Bonzini wrote:
Just my 2 cents on the language topic, as in general I agree completely with Stefan.
Luckily, several benefits don't require a full rewrite or language switch: - readability from RAII-style code. If this is important enough, we could actually use GCC __attribute__((cleanup)) or, heaven forbid, slowly introduce C++ in QEMU's code base.
This one is cool, and supported by both gcc and clang (and we really don't have any example of anyone clamoring for a different compiler). For example, here's what I recently added to nbdkit to make it MUCH easier to properly remember to unlock a mutex on all exit paths from a scope:
https://github.com/libguestfs/nbdkit/commit/0f24d66648 https://github.com/libguestfs/nbdkit/commit/b5ab4835e1 -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org