On Tue, Jun 2, 2020 at 10:53 PM Ilija Tovilo <tovilo.il...@gmail.com> wrote:

> Hi internals
>
> I'd like to introduce another RFC I've been working on:
> https://wiki.php.net/rfc/nullsafe_operator
>
> It introduces the nullsafe operator ?-> that skips null values when
> calling functions and fetching properties. In contrast to the last few
> attempts this RFC includes full short circuiting.
>
> Let me know what you think.
>

The semantics look reasonable to me, but I'd recommend including some
discussion on the rationale behind the short-circuiting behavior in the
RFC. That is, what the options are, and why this is the best option (which
is not the option that the previous RFC on this topic picked). It would
also be nice to cross-reference semantics of ?-> in other languages that
have it, to make sure we don't introduce any unexpected WTFs for people
switching between languages. I *think* the specified behavior is consistent
with what everyone else does, but I haven't checked to be sure.

Regards,
Nikita

Reply via email to