Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99595 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96916 invoked from network); 21 Jun 2017 17:14:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2017 17:14:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 212.232.25.162 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 212.232.25.162 mx206.easyname.com Received: from [212.232.25.162] ([212.232.25.162:60699] helo=mx206.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/4E-13828-479AA495 for ; Wed, 21 Jun 2017 13:14:28 -0400 Received: from cable-81-173-132-37.netcologne.de ([81.173.132.37] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1dNjCx-0004hF-1L; Wed, 21 Jun 2017 17:14:24 +0000 References: <27.FD.13828.277AA495@pb1.pair.com> To: php-internals , Andrea Faulds Message-ID: <4c4b9474-7c59-6235-0184-6f60cad531f9@fleshgrinder.com> Date: Wed, 21 Jun 2017 19:14:15 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <27.FD.13828.277AA495@pb1.pair.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="n2V4dpRv3JjcEfhRm1EhBgJxR2gxtKdDS" X-DNSBL-PBLSPAMHAUS: YES Subject: Re: [PHP-DEV] [RFC] Unary null coalescing operator From: php@fleshgrinder.com (Fleshgrinder) --n2V4dpRv3JjcEfhRm1EhBgJxR2gxtKdDS Content-Type: multipart/mixed; boundary="LfaXrGwfnX79kG3x8PDlwE3Rib0T3fXhU"; protected-headers="v1" From: Fleshgrinder To: php-internals , Andrea Faulds Message-ID: <4c4b9474-7c59-6235-0184-6f60cad531f9@fleshgrinder.com> Subject: Re: [PHP-DEV] [RFC] Unary null coalescing operator References: <27.FD.13828.277AA495@pb1.pair.com> In-Reply-To: <27.FD.13828.277AA495@pb1.pair.com> --LfaXrGwfnX79kG3x8PDlwE3Rib0T3fXhU Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/21/2017 7:05 PM, Andrea Faulds wrote: > Hi all, >=20 > Here's a small RFC for a small feature, which I've wondered about for a= > while: https://wiki.php.net/rfc/unary_null_coalescing_operator >=20 > What do you think of it? >=20 > Thanks! I would prefer [1] to be extended to any and everything that can be null, like Kotlin, Ceylon, and others have it. Otherwise one needs to change back and forth between one and two question marks depending on context. The null coalesce operator is more of a special form of the ternary operator, but this proposal is a different beast and closer to nullable types than to the ternary operator. Hence, using a single question mark comes more natural. [1] https://wiki.php.net/rfc/nullsafe_calls --=20 Richard "Fleshgrinder" Fussenegger --LfaXrGwfnX79kG3x8PDlwE3Rib0T3fXhU-- --n2V4dpRv3JjcEfhRm1EhBgJxR2gxtKdDS 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 iQIcBAEBCAAGBQJZSqltAAoJEOKkKcqFPVVrgWAP/19xmS5eR2sT6LdoalZEdY2b SfhRJYVR0cLJjF842cI+LHiD69xv6uOHDaVxDIdwktSHmIaEIxWtWze72LMCeIbS a3ldzUREQKqBJIJbQOk9EHGB2Vdvf2hgUAzfYUg0e67ode7MbyoZMI2heDYNpJwL GheSdbKptGN8w3LYdB/HyXopsPTqpLwDM8XbKdvVtOkiyU84RgQN9pIu1DgXSnpu Mg0X90n2h5XE6bBRY5IjrlRfZUOoTLANRyOwFvifG9v6qMKgX3UEjv2TDM1V3b8y nnMZiM2mFSTcLf+fGKFU7AAl3Rwp7dSK1HqZ1yChCfwEEajz6knhjxwoB8jFUqCQ anZm4bV6nfC6oLvVYdLAb1f5IApsZckHgi1rttSdpp5NKnpxlkRXgZN2wvfF13VV VMpehAXZtOSKMnyOhNt2+lMwCeEFUpiUBZL7CezoyHQPXtt6Fjmh1XeeV3yoVPhd LQrf7EPSrGhNNKqTxnpBDJqAHugxOQU142unX1ago4WrPvQhjHcW75Ya+aCst20R h4lmk8ZWeNdvbJ1t4BSYTYz+VWJuvaSNw59Cxmtvva7OARo2RYAxIWYq6dPpDx1T 6PPevPcnuH5YZHFiwX4ki07m75fWn3iFTTThMpTcp7PPw0Ck0mAJYzRp221RCZHV T4Y6SggESDnJjVkN6AVQ =5GNW -----END PGP SIGNATURE----- --n2V4dpRv3JjcEfhRm1EhBgJxR2gxtKdDS--