---------- Forwarded message ---------
From: Eugene Sidelnyk <zsidel...@gmail.com>
Date: Tue, Nov 3, 2020 at 7:08 PM
Subject: Re: [PHP-DEV] Nullsafe
To: Benjamin Morel <benjamin.mo...@gmail.com>


But currently working code doesn't fail with NullPointerException?
Otherwise it would not be a working code.
Early fail will be when we try return / pass anywhere this value

On Tue, Nov 3, 2020, 6:48 PM Benjamin Morel <benjamin.mo...@gmail.com>
wrote:

> On Tue, 3 Nov 2020 at 17:38, Eugene Sidelnyk <zsidel...@gmail.com> wrote:
>
>> I am wondering why don't we use ordinary `->` operator with safe null
>> handling?
>
>
> Hi,
>
> - changing the current behaviour of `->` would be a huge BC break
> - and if we need another reason, there are many situations where you do
> want to fail early if the left operand is null, so the current operator is
> a good fit
>
> — Benjamin
>

Reply via email to