Re: [VOTE] Void Return Type RFC
| From: | Andrea Faulds | Date: | Thu, 29 Oct 2015 18:26:41 +0000 |
| Subject: | Re: [VOTE] Void Return Type RFC | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-89004@lists.php.net to get a copy of this message | ||
Hi,
Levi Morrison wrote:
On Wed, Oct 28, 2015 at 8:17 PM, François Laupretre <francois@php.net> wrote:I'm also against this for the same reason. There might potentially be a workaround, but I'm not convinced we need to prevent this in the first place. I think it's more important to ensure functions don't return anything (particularly for interfaces) than to prevent the use of a void function in an expression. The latter is fairly harmless. Thanks. -- Andrea Faulds http://ajf.me/Hi Andrea, Le 29/10/2015 01:08, Andrea Faulds a écrit :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.The vote can be found here: https://wiki.php.net/rfc/void_return_type#voteJust 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.