Re: [VOTE] Void Return Type RFC
| From: | Levi Morrison | Date: | Thu, 29 Oct 2015 02:44:53 +0000 |
| Subject: | Re: [VOTE] Void Return Type RFC | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-88983@lists.php.net to get a copy of this message | ||
On Wed, Oct 28, 2015 at 8:17 PM, François Laupretre <francois@php.net> wrote:
> Hi Andrea,
>
> Le 29/10/2015 01:08, Andrea Faulds a écrit :
>>
>>
>> The vote can be found here:
>>
>> https://wiki.php.net/rfc/void_return_type#vote
>
>
> Just voted +1 as, unlike some :), I like the idea of distinguishing void
> from null.
>
> Is it too late to add a note in the RFC, listing the possibility, in the
> future, to forbid using the result of void functions in expressions.
I pray this never happens. It makes it difficult to use functions as
parameters. There are times where it's logically okay to not return
something, and sometimes that same higher-order function can return
something.
This is one reason I am against
void. It doesn't follow the
conventions from other languages. I think the type null better conveys
PHP's semantics and desired behavior.