C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Calling methods on a nullptr

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 29 Oct 2024 15:04:31 -0700
On Tuesday 29 October 2024 14:56:56 Pacific Daylight Time Frederick Virchanza
Gotham via Std-Proposals wrote:
> What this means is that you can chain them without checking for a
> nullptr at each step, something like:
>
>
> pmanager->GetDevice()->GetChannel(0)->GetLowPassFilter()->GetCodecName();
>
> I'm not sure if this is a fantastic idea but I think it's worth looking at.

And I think we've concluded looking at it and dismissed it. We have better
ways of accomplishing the same. Even if you disagree they're better, we have
*other* ways and you have not shown that the other ways are significantly worse
than this immature idea to be worth pursuing it further with a core language
change.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Platform & System Engineering

Received on 2024-10-29 22:04:33