All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)
Date: Fri, 08 Apr 2016 15:15:03 +0200	[thread overview]
Message-ID: <87bn5ktf6w.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <57067660.8030700@redhat.com> (Paolo Bonzini's message of "Thu, 7 Apr 2016 17:01:52 +0200")

Paolo Bonzini <pbonzini@redhat.com> writes:

> On 07/04/2016 16:49, Peter Maydell wrote:
>> > QOM to C++ classes
>> I suspect if you looked at this you'd find that the QOM semantics
>> for various things don't map onto C++ (ie that we have more runtime
>> flexibility than C++ does).
>
> True, but you don't have to use it. :)  If your code is static, one
> could imagine bindings to C++ that eliminate some of the boilerplate.
> Don't look at me, though.
>
> On the other hand, minimal usage of templates instead of some of the
> preprocessor gunk we have would be a very good thing IMNSHO.  I am
> referring to the multiply included header files and to the macros with
> type arguments (mostly QOM casts).
>
> I don't think we need more C++ than that, but using templates as
> basically a type-safe preprocessor would improve QEMU a little bit.
> More rarely, lambdas could replace some preprocessor magic too, but
> that's C11 and not many compilers support them.
>
> But I won't weep if people say no because we have a lot other
> low-hanging fruit to make QEMU better (especially the header file

"No!"  (Hey, you asked for it)

Back to serious.  As Peter Maydell said, "if we move away from C I'd
rather it to be a language that's nicer than C rather than one that's
uglier and larger and still retains all of C's flaws."

People sometimes propose to defang C++ by subsetting and/or coding
conventions.  I'll take that seriously when I see the tool that
rigorously checks adherence to subset / convention.  We're bad enough at
getting everybody write half-decent C, and making the problem harder is
unlikely to help.

> cleanups that Markus started and I want to conclude very early in 2.7).

Speaking of which: the plan was you post yours for 2.7, and then I can
build on top (assuming there's useful work left), right?

  reply	other threads:[~2016-04-08 13:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 14:38 [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code) Lluís Vilanova
2016-03-09 15:52 ` Richard Henderson
2016-03-09 18:16   ` Lluís Vilanova
2016-03-09 18:54     ` Richard Henderson
2016-03-09 22:29       ` Lluís Vilanova
2016-03-09 23:27         ` Peter Maydell
2016-03-13 13:16           ` Lluís Vilanova
2016-03-13 16:25             ` Peter Maydell
2016-03-14  7:06               ` Markus Armbruster
2016-03-14 11:13                 ` Lluís Vilanova
2016-04-03 13:05                 ` Lluís Vilanova
2016-04-07 14:27                   ` Markus Armbruster
2016-04-07 14:49                   ` Peter Maydell
2016-04-07 15:01                     ` Paolo Bonzini
2016-04-08 13:15                       ` Markus Armbruster [this message]
2016-04-08 14:14                         ` Paolo Bonzini
2016-04-11  5:50                           ` Claudio Fontana
2016-04-11 13:11                             ` Lluís Vilanova
2016-03-14 12:23   ` KONRAD Frederic
2016-03-14 14:14     ` Paolo Bonzini
2016-03-14 14:26     ` Lluís Vilanova

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bn5ktf6w.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.