Re: [RFC] Nullsafe calls
| From: | Stanislav Malyshev | Date: | Thu, 11 Dec 2014 07:33:45 +0000 |
| Subject: | Re: [RFC] Nullsafe calls | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79559@lists.php.net to get a copy of this message | ||
Hi!
> I think it's confusing the other way, and "instead of raising a fatal
> for calling a method on null, it returns null" is just as simple of
> an explanation.
What is confusing in "no call is made, so nothing is evaluated" or in
"as soon as we see null, we stop and return null"? I can not believe
anybody smart enough to use a computer could be genuinely confused by this.
> All of that said: it's not clear to me that this actually matters
> that much. I wasn't able to quickly find an example because the vast
I think it does matter, and weird magic should not be a part of the
language.
--
Stas Malyshev
smalyshev@gmail.com