C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Labelled parameters

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Mon, 5 Jan 2026 17:12:43 +0200
On Mon, 5 Jan 2026 at 16:39, Jan Schultke via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>>
>> Unfortunately, the answer is yes, it is apparently too much to ask.
>>
>> Like many features that are available in modern languages but missing,
>> complicated or ugly in C++, named parameters can be easily and
>> consistently supported in a language when they are designed in from the
>> start. Finding a syntax for named parameters is easy - finding a way to
>> add them to the existing language without breaking compatibility, ABI's
>> and existing code, and doing so in a manner that fits the rest of the
>> language now and in the future - that's the hard part.
>
>
> When you say it's too much to ask, you're saying that the C++ equivalent of the Kotlin sample I've shown is just fundamentally infeasible at this point? That is:
>
>> haystack.contains(it, .ignoreCase=true)
>
>
> ... is just beyond our ability to add to the language? Personally I think it's feasible, but it remains to be seen whether we're willing to do it without an explicit opt-in. A lot of people here think we need one.

I think we can add mandatory-named parameters and optionally-named
parameters into C++. I don't think we should waste our time trying to
do either
without declaration-level opt-in, as that will trigger OMDB opposition.

Received on 2026-01-05 15:12:59