Re: [VOTE] Void Return Type RFC
| From: | Stanislav Malyshev | Date: | Fri, 30 Oct 2015 03:55:41 +0000 |
| Subject: | Re: [VOTE] Void Return Type RFC | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-89013@lists.php.net to get a copy of this message | ||
Hi!
> "void" or "null" as return type would give a 100% guarantee that every
> possible
> implementation of a given interface won't return any random value. Then it would
> make no difference if the returned value is being used or not, as it
> would always
> be null.
>
> So, it obviously solves the problem presented. There's not much to dismiss here.
That's what I am having issue with. I don't see the case where such
guarantee is useful. If you're not using the return value, why do you
care if it's always null or sometimes null and sometimes baloney
sandwich? If you need always null, you have it: null. You don't need to
use return value of a function for it.
--
Stas Malyshev
smalyshev@gmail.com