Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93539 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56724 invoked from network); 25 May 2016 21:42:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2016 21:42:21 -0000 Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.84 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.84 mx103.easyname.com Received: from [77.244.243.84] ([77.244.243.84:39290] helo=mx202.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/1F-14311-C3C16475 for ; Wed, 25 May 2016 17:42:20 -0400 Received: from cable-81-173-133-15.netcologne.de ([81.173.133.15] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1b5gZF-0002y1-15; Wed, 25 May 2016 21:42:17 +0000 Reply-To: internals@lists.php.net References: <7B.12.14311.F79C5475@pb1.pair.com> <1b12b09f-f190-dca0-51d9-468e9c571268@fleshgrinder.com> <4ec823c6-b039-fc91-7c78-60d67719cd81@gmail.com> To: Stanislav Malyshev , internals@lists.php.net, Andrea Faulds Cc: Marco Pivetta , Benoit Schildknecht , Niklas Keller Message-ID: <00482771-3a07-06cf-ee8d-cd83a301c7e7@fleshgrinder.com> Date: Wed, 25 May 2016 23:42:08 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <4ec823c6-b039-fc91-7c78-60d67719cd81@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KHNCEqTHmBUbBnN8Gp6O9XhrdsD8Enpwg" X-ACL-Warn: X-DNSBL-BARRACUDACENTRAL Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: php@fleshgrinder.com (Fleshgrinder) --KHNCEqTHmBUbBnN8Gp6O9XhrdsD8Enpwg Content-Type: multipart/mixed; boundary="Evc3aoawcshaL5WpnKInwWXVfwXH4XtFO" From: Fleshgrinder Reply-To: internals@lists.php.net To: Stanislav Malyshev , internals@lists.php.net, Andrea Faulds Cc: Marco Pivetta , Benoit Schildknecht , Niklas Keller Message-ID: <00482771-3a07-06cf-ee8d-cd83a301c7e7@fleshgrinder.com> Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties References: <7B.12.14311.F79C5475@pb1.pair.com> <1b12b09f-f190-dca0-51d9-468e9c571268@fleshgrinder.com> <4ec823c6-b039-fc91-7c78-60d67719cd81@gmail.com> In-Reply-To: <4ec823c6-b039-fc91-7c78-60d67719cd81@gmail.com> --Evc3aoawcshaL5WpnKInwWXVfwXH4XtFO Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 5/25/2016 11:37 PM, Stanislav Malyshev wrote: > Hi! >=20 >> We already have the differentiation between IS_NULL and IS_UNDEF, why >> not expose the latter to userland? I mean, JavaScript has it too and >> people are able to understand it. >=20 > IS_UNDEF is not a PHP type, it is an engine implementation flag. Now, > adding a new type "undefined" would be a pretty big thing and then you'= d > need to deal with all the implications of it. Including a huge BC break= > of changing the type of all uninitialized variables, and the question o= f > "what if I want my parameter to be able to accept undefined values" and= > so on. Huge can of worms, and all of it again just to have a type that > is exactly like null but not null. While the only reason null exists is= > to do exactly what "undefined" is proposed to do. >=20 Andrea already said that we would not use it for untyped properties, hence, no BC. It is not the same as null, very similar, but definitely not the same. Think of it in DB terms: | table | | ----- | | id | SELECT name FROM table; That's not null, it's not defined (undefined, unset, ...). In other words, null is a value and undefined/unset a state. Whether this proposal should become part of this RFC or not is something that needs to be discussed. --=20 Richard "Fleshgrinder" Fussenegger --Evc3aoawcshaL5WpnKInwWXVfwXH4XtFO-- --KHNCEqTHmBUbBnN8Gp6O9XhrdsD8Enpwg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXRhwwAAoJEOKkKcqFPVVrW60P/ifBC1zbOmbPeYrHb3nX+LI5 EU31HqnM+bSKxaYL7os9iY24RKwvMWtpf4XI48qiKfhGIo4Eqsrn0OhNdCh1nJrE dFA+iuEXCQvfQXKq8myebusNgrCSCc2hzjd7EoSVBkTm1M/Z0YyfrDu1BAbiLz6Q 4kD+alLCXKzDi6VrBwkfdsCoDFBn9fO24oiKjkME5vndu8xWbU+2IJGnsAG9wqye 9/jDRwI6By7JOri0vfXKSnkknmbHgnXCZ5UivXFBWy0j7Bqw5V3NERkGQ13orHg0 p8QCYZXiQ3LSMxZbgekdfxG+lk9k8PNMxh7wkN98g4KjUO88gi/C92a0UcvSwNPC QNBp9KBLAbkQOPGTW3P77ejQvs3MmBapCqKAnDMbRuwW8BxQ0mQ8OFDvg1WqB0GS U3fJNdPub8XuJeeulixexLUSrCK7ThCg6l4KTXn2XqrGgDpTUOMAOO4A4P001lMO ReAbeqgyBus8gohWzX4yjXg40Q2JdT3oiKQ4W1IjvoBpM1AbPDwm56qApLKcMvTv jIUY0kqPVmIeT84jjxopbrFz0G3T8rbxwyHjzcA0a7KZb2LX0f7uwrtwLL/sQIas SAKvNs5odNeztgsF8eqe2Y+uo2qxw0ctnA3fdYwr99rCteO8bwqHekT09VEZ3PS9 PX9xfblWhreye07Ral9c =a6Eh -----END PGP SIGNATURE----- --KHNCEqTHmBUbBnN8Gp6O9XhrdsD8Enpwg--