C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Fwd: Extension to runtime polymorphism proposed

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 05 Apr 2026 09:03:46 -0700
On Saturday, 4 April 2026 23:57:02 Pacific Daylight Time Simon Schröder via
Std-Proposals wrote:
> Also, rvalues (if I’m not mistaken) go down to the IR and don’t optimize on
> the level of the AST. If your optimizations can only be done on the AST,
> this is certainly a totally different thing.
>
> Don’t just use “guaranteed semantics” as a buzz word, but actually describe
> what you want to guarantee

Muneem might be misusing "AST optimisation" term. If we put together the two
above, what he may be proposing is like what rvalue references enabled:
distinct functions that may be able to do more/different things than what
existed before. That would be a difference in the AST, because it would be a
different program altogether.

However:
a) I don't know if that's the case. There's no syntax proposed.

b) even what little I understand doesn't match the problem in question of
replacing a switch

c) I don't buy that this is worth it, because without a clear explanation of
where this solution would be used, it's impossible to judge its value

The adding of even more seemingly unrelated things into the discussion, like
virtual functions, does not help understanding what the problem is. Making
imprecise statements that can be easily refuted only muddies the problem
further.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.

Received on 2026-04-05 16:03:58