qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH experiment 00/16] C++20 coroutine backend


From: Paolo Bonzini
Subject: Re: [PATCH experiment 00/16] C++20 coroutine backend
Date: Thu, 17 Mar 2022 16:11:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 3/16/22 13:32, Stefan Hajnoczi wrote:
You can define rules and a way to enforce a subset of C++, but I think
over time the code will be C++. A policy that is complicated discourages
contributors.

For these reasons I think that if code runs through a C++ compiler we
should just allow C++. Either way, it will take time but that way no one
will feel betrayed when C++ creeps in.

Fair enough. We even already have some conventions that will make any C++ that creeps in less weird (for example, mandatory typedef of structs).

I don't think it would be a big deal overall. I actually agree that we should "just allow C++", what matters more to have style rules that make QEMU's flavors of C and C++ consistent.

Most files are leaves (i.e. they just expose an interface via type_init/block_init/etc.), where almost always people will copy from something that already exists and which will be C. What matters are the core APIs, and maintainers have way more authority there to say no to code they're not comfortable reviewing. This way, code within a subsystem will keep some consistency.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]