C++ Logo

std-proposals

Advanced search

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

From: Andre Kostur <andre_at_[hidden]>
Date: Tue, 29 Oct 2024 07:56:24 -0700
Please answer Jeremy’s question. Right now what I’m seeing:

p->fn(); says that I want to invoke fn() on the object where p is
pointing. But if p is nullptr, then it is not pointing at a valid object,
so that statement does not make semantical sense. That one can concoct
some mechanism that it will do something is rather beside the point.
Additionally, what happens if fn() is a pure virtual function? Yay, more
UB, just harder to find?

On Tue, Oct 29, 2024 at 07:32 Frederick Virchanza Gotham via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On Sun, Oct 27, 2024 at 8:25 PM Jonathan Wakely wrote:
> >
> > So this time you haven't even bothered to pretend there's a good reason
> to support this.
> >
> > This list is for PROPOSALS not idle banter and time wasting.
>
>
> We argued this point back in March, around about here:
> https://lists.isocpp.org/std-proposals/2024/03/9444.php
>
> I remember also last year there was discussion here about the scope of
> this mailing list, and I remember the late Edward Catmur made a very
> good contribution to the discussion to affirm that this is the right
> place to float an idea.
>
> Jonathan, if you want a group where people only share
> thoroughly-developed ideas, then you'll need to either start a new
> group or try to have the scope of this one changed.
>
> This particular mailing list is not just for sharing papers, it's also
> a place to make challenges on long-standing trends in the language, or
> to float a half-baked idea.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2024-10-29 14:56:39