Fwd: [PHP-DEV] Nullsafe

2020-11-03 Thread Eugene Sidelnyk
-- Forwarded message - From: Eugene Sidelnyk Date: Tue, Nov 3, 2020 at 7:08 PM Subject: Re: [PHP-DEV] Nullsafe To: Benjamin Morel 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 /

Fwd: [PHP-DEV] Nullsafe

2020-11-03 Thread Eugene Sidelnyk
On Tue, Nov 3, 2020, 7:58 PM Benjamin Morel wrote: > Hi, > > It currently returns null but issues a warning (which can be, and often > is, converted to an exception by frameworks / custom error handlers): > https://3v4l.org/1ZkVC > > The new operator returns null with no warning: > https://3v4l.o

Fwd: [PHP-DEV] Nullsafe

2020-11-03 Thread Eugene Sidelnyk
-- Forwarded message - From: Eugene Sidelnyk Date: Tue, Nov 3, 2020 at 8:11 PM Subject: Re: [PHP-DEV] Nullsafe To: Benjamin Morel When trying call a method, php falls with fatal error: https://3v4l.org/jk5Fp With nullsafe it silently returns null: https://3v4l.org/MhXtM Are th

Fwd: [PHP-DEV] Nullsafe

2020-11-03 Thread Eugene Sidelnyk
-- Forwarded message - From: Eugene Sidelnyk Date: Tue, Nov 3, 2020 at 9:05 PM Subject: Re: [PHP-DEV] Nullsafe To: G. P. B. Null value by itself was invented to indicate lack of data. But we can't just use it instead of objects, because of how it works. We need to create a boile

Fwd: [PHP-DEV] Nullsafe

2020-11-03 Thread Eugene Sidelnyk
-- Forwarded message - From: G. P. B. Date: Tue, Nov 3, 2020 at 9:08 PM Subject: Re: [PHP-DEV] Nullsafe To: Eugene Sidelnyk On Tue, 3 Nov 2020 at 19:05, Eugene Sidelnyk wrote: > Null value by itself was invented to indicate lack of data. > But we can't just use it instead of o