Re: Nullsafe
| From: | Josh Bruce | Date: | Wed, 04 Nov 2020 19:11:27 +0000 |
| Subject: | Re: Nullsafe | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-112181@lists.php.net to get a copy of this message | ||
> 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.
>
Agreed.
I’m not overly opinionated about much, but null as a default habit is one of them. I want the use
of null and workarounds to feel ugly and dirty, because they are - imho. (The billion dollar
mistake.)
Absolute last resort.
Also agreed on explicit communication of intent. If the operator flipped is want another operator to
disallow null...at which point the world has not changed, just perceived default and desirable
methods.
Cheers,
Josh