Re: [RFC] Void Return Type (v0.2, reöp ening)

From: Date: Wed, 14 Oct 2015 22:00:30 +0000
Subject: Re: [RFC] Void Return Type (v0.2, reöp ening)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-88793@lists.php.net to get a copy of this message
Hi! > I'm reviving my Void Return Type RFC, this time for PHP 7.1: > > https://wiki.php.net/rfc/void_return_type > > Please read it and tell me your thoughts! I still see no point in this, as every PHP function actually returns something (at least null). So this type would not actually be right and would not reflect what actually is happening. Moreover, I don't see any scenario where some code depends on a function not returning something explicitly (i.e. does not use return value) but function actually returns something explicitly and the calling code breaks. This appears to be impossible, and thus there's no reason to declare a function "void" except purely for documentation purposes. Adding keywords to the language just to document this does not look to me like a good idea. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#88793) next »