Hi,
Levi Morrison wrote:
On Wed, Oct 28, 2015 at 8:17 PM, François Laupretre <franc...@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.
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/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php