Date: Wed, 26 Nov 2025 20:32:36 -0800
On Wednesday, 26 November 2025 14:57:03 Pacific Standard Time Frederick
Virchanza Gotham via Std-Proposals wrote:
> On Wed, Nov 26, 2025 at 12:35 AM Thiago Macieira wrote:
> > Then *write a paper* that explains the problem, how people work with this
> > API design flaw (or pitfall), what the solution should do (not *how* it
> > does), and what other alternatives there are. One alternative to
> > investigate is "do nothing, this only happens with poorly-designed APIs".
>
> If the only use-case for 'std::chimeric_ptr' were to compensate for
> badly-designed API's then I'd still push for it. But I'm not so sure
> that that's the only use for it.
That's great. Looking forward to the paper that lists a few of those common
use-cases.
> Someone comes along and makes a concrete class that inherits from A, B, D,
> F, H. Another guy comes along and makes a concrete class that inherits from
> A, C, D, G, H.
> And then another guy comes along and makes a concrete class that
> inherits from A, B, C, D, E, F.
This is not a different problem. It's the same problem, based on the same
poorly-defined API. Why did someone need a base for each and every one of the
operations? Are they used in multiple places? Is there at least one class that
has one but not the rest of the bases? This seems to me that someone used a
C++ feature because they could, not because they needed it or because it was
good design.
Virchanza Gotham via Std-Proposals wrote:
> On Wed, Nov 26, 2025 at 12:35 AM Thiago Macieira wrote:
> > Then *write a paper* that explains the problem, how people work with this
> > API design flaw (or pitfall), what the solution should do (not *how* it
> > does), and what other alternatives there are. One alternative to
> > investigate is "do nothing, this only happens with poorly-designed APIs".
>
> If the only use-case for 'std::chimeric_ptr' were to compensate for
> badly-designed API's then I'd still push for it. But I'm not so sure
> that that's the only use for it.
That's great. Looking forward to the paper that lists a few of those common
use-cases.
> Someone comes along and makes a concrete class that inherits from A, B, D,
> F, H. Another guy comes along and makes a concrete class that inherits from
> A, C, D, G, H.
> And then another guy comes along and makes a concrete class that
> inherits from A, B, C, D, E, F.
This is not a different problem. It's the same problem, based on the same
poorly-defined API. Why did someone need a base for each and every one of the
operations? Are they used in multiple places? Is there at least one class that
has one but not the rest of the bases? This seems to me that someone used a
C++ feature because they could, not because they needed it or because it was
good design.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Data Center - Platform & Sys. Eng.
Received on 2025-11-27 04:32:42
