Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92808 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18462 invoked from network); 26 Apr 2016 17:33:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2016 17:33:16 -0000 Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.140 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.140 blu004-omc4s1.hotmail.com Received: from [65.55.111.140] ([65.55.111.140:55823] helo=BLU004-OMC4S1.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F2/A6-20013-A56AF175 for ; Tue, 26 Apr 2016 13:33:15 -0400 Received: from BLU436-SMTP190 ([65.55.111.136]) by BLU004-OMC4S1.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 26 Apr 2016 10:33:12 -0700 X-TMN: [fHKYUGRmOhDKVgvpkpwbSseSrQ9pWsfI] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) In-Reply-To: Date: Tue, 26 Apr 2016 19:33:07 +0200 CC: Levi Morrison , Dmitry Stogov , internals , Joe Watkins Content-Transfer-Encoding: quoted-printable References: <571F7B91.2030102@zend.com> To: Niklas Keller X-Mailer: Apple Mail (2.3112) X-OriginalArrivalTime: 26 Apr 2016 17:33:09.0879 (UTC) FILETIME=[B3859870:01D19FE1] Subject: Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types From: bobwei9@hotmail.com (Bob Weinand) > Am 26.04.2016 um 19:00 schrieb Niklas Keller : >=20 > 2016-04-26 16:58 GMT+02:00 Bob Weinand : >=20 >> Yeah, I'd like to not allow ?Foo in any case if union types pass. >>=20 >=20 > What's the reason for that? To me, null is neither a type nor should = it be. I don't want to argue that now, but null most definitely IS a type. It = is the null type with a single value, null, whose semantics is to = represent the absence of any other value. There's also plenty of evidence in PHP that null is considered a type: = get_type(), https://php.net/null, has it's own is_* function etc. At least in the PHP ecosystem it is considered its own type. Other type = systems may not, but the one of PHP does. Thus, we are definitely considering it as a type - a question for you: = What's the type of the value null then, if not null? If we wouldn't make a distinction between null and an object (i.e. allow = null to be passed to a function(Foo $foo) {}), it could be considered a = supervalue of type object. But that's not the case. =20 Bob=