C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Labelled parameters

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 05 Jan 2026 11:25:07 -0300
On Monday, 5 January 2026 04:03:36 Brasilia Standard Time Simon Schröder via
Std-Proposals wrote:
> If this feature is not opt-in, maybe we should make it opt-out. Maybe some
> library writers don’t want to give guarantees for parameter names as part
> of their API. Without an explicit opt-out they’d have to declare all
> functions twice and change up parameter names in the second declaration.
> This does not seem like a convenient solution. (But it will happen if we
> don’t give a way for explicit control.)

It might be acceptable to declare opting in or out in the documentation.

For example, there's no programmatic way to declare that a class will follow
binary compatibility rules today. That's all in the documentation. Therefore,
developers must read the docs to know if the functions they use will remain
present in the next release when they upgrade. It's probably acceptable to use
the same for named/labelled parameters: libraries declare in their docs
whether those are part of the source compatibility guarantee.

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

Received on 2026-01-05 14:25:15