Re: Nullsafe

From: Date: Tue, 03 Nov 2020 19:35:40 +0000
Subject: Re: Nullsafe
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-112169@lists.php.net to get a copy of this message
About implemented, there were many implemented features, but not accepted. I was very frustrated, when I knew that PHP could have https://wiki.php.net/rfc/userspace_operator_overloading , and it was already implemented. But some people vote down, because they are "narrow-minded" and "have bad preconceptions" and would like to find more things they like about the feature. On Tue, Nov 3, 2020 at 8:33 PM G. P. B. <george.banyard@gmail.com> wrote: > On Tue, 3 Nov 2020 at 16:48, Benjamin Morel <benjamin.morel@gmail.com> > wrote: > >> On Tue, 3 Nov 2020 at 17:38, Eugene Sidelnyk <zsidelnik@gmail.com> wrote: >> >> > I am wondering why don't we use ordinary -> >> > operator with safe null >> > handling? >> > > Implicit nullable is terrible, moreover I don't see why users should > return null values more often. > They serve their purpose but most of the time you can use another > sane/safe default of the given > property type. > > Moreover, I don't see the issue with another operator as it conveys > *clear* intent especially in > PHP as everything is null by default (might warn but still). > > *Technically* this isn't a BC break, but it's an enormous change of > semantics for something > which is worse IMHO. Also the operator has already been voted on, > accepted, and implemented. > > Regards, > > George P. Banyard >

« previous php.internals (#112169) next »