Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88817 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23341 invoked from network); 15 Oct 2015 15:32:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2015 15:32:23 -0000 X-Host-Fingerprint: 2.123.167.169 unknown Received: from [2.123.167.169] ([2.123.167.169:24890] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 66/D4-23021-707CF165 for ; Thu, 15 Oct 2015 11:32:23 -0400 Message-ID: <66.D4.23021.707CF165@pb1.pair.com> To: internals@lists.php.net References: <0A.C2.33697.6AECE165@pb1.pair.com> <561ED07E.4060809@gmail.com> <561F6718.7020900@gmail.com> X-Mozilla-News-Host: news://news.php.net Date: Thu, 15 Oct 2015 16:32:21 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38 MIME-Version: 1.0 In-Reply-To: <561F6718.7020900@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 2.123.167.169 Subject: =?UTF-8?Q?Re:_[PHP-DEV]_[RFC]_Void_Return_Type_=28v0.2=2c_re=c3=b6p?= =?UTF-8?Q?ening=29?= From: ajf@ajf.me (Andrea Faulds) Hi Rowan, Rowan Collins wrote: > But why "invent" (as far as PHP is concerned) this new keyword of "void" > to mean exactly the same thing "null" already means - absence of a > definite value? They don't mean exactly the same thing. null is a value to represent a lack of a value. But there's also the concept of *no value at all* (a missing variable, say). The closest we have to that in PHP already would actually be `unset`, but that's a strange choice given it's not what we use in documentation (function prototypes, PHP manual, PHPDoc, etc. use `void`), and it's tainted by the bizarro `(unset)` cast which casts to null. Thanks. -- Andrea Faulds http://ajf.me/