On Wed, Jun 2, 2010 at 2:44 AM, Paolo Bonzini <bonz...@gnu.org> wrote:

> In particular, I wonder if the best use of C++ wouldn't be a set of
> functions (including templates, etc.) implementing a kind of RTTI with a
> less verbose syntax than what we have now.

Agreed.  I don't agree with the rejection of simple function templates
and class templates.  Many macro-games we currently play, are good
candidates as you shown in your message.  Furthermore, many of the
casts are there because C does not give us  'generic type macros' that
scale.

In the guidelines, I would like to include:
   (1) cast should be minimized
   (2) if you define a class template used mostly with pointer type arguments,
        consider specializing for void* (or const void*) and define all other
        pointer specialization in terms of that.

Reply via email to