C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Labelled parameters

From: Jan Schultke <janschultke_at_[hidden]>
Date: Mon, 5 Jan 2026 15:39:31 +0100
>
> 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.

Received on 2026-01-05 14:39:48