Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93958 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11033 invoked from network); 14 Jun 2016 16:36:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jun 2016 16:36:31 -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.94 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.94 blu004-omc2s19.hotmail.com Received: from [65.55.111.94] ([65.55.111.94:61985] helo=BLU004-OMC2S19.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/F1-34398-E8230675 for ; Tue, 14 Jun 2016 12:36:31 -0400 Received: from BLU437-SMTP51 ([65.55.111.73]) by BLU004-OMC2S19.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 14 Jun 2016 09:36:27 -0700 X-TMN: [itvGJjhq2IDCPFyaeQV+6LUTyhHH0ers] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: text/plain; charset="windows-1252" MIME-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) In-Reply-To: Date: Tue, 14 Jun 2016 18:36:23 +0200 CC: Derick Rethans Content-Transfer-Encoding: quoted-printable References: To: PHP internals X-Mailer: Apple Mail (2.3112) X-OriginalArrivalTime: 14 Jun 2016 16:36:25.0467 (UTC) FILETIME=[E4934CB0:01D1C65A] Subject: Re: [PHP-DEV] [RFC] [VOTE] Union types From: bobwei9@hotmail.com (Bob Weinand) > Am 14.06.2016 um 18:09 schrieb Fleshgrinder : >=20 > On 6/14/2016 5:22 PM, Derick Rethans wrote: >> Not clear on some of the wording. When you say: >>=20 >> "This RFC proposes a vote on whether ?Foo shall be replaced by Foo |=20= >> null in general." >>=20 >> Do you mean that ?Foo will no longer be allowed at all if this RFCs=20= >> passes? >>=20 >> cheers, >> Derick >>=20 >=20 > Same question here, since https://wiki.php.net/rfc/nullable_types > already passed and directly voiding it makes no sense. >=20 > I mentioned this before but maybe it is better to change the RFC to > disallow the question mark if an union type is in use: >=20 > # OK >=20 > ?string > null|string > string|null >=20 > ?SomeClass >=20 > SomeClass|SomeOtherClass|null > null|SomeClass|SomeOtherClass > SomeClass|null|SomeOtherClass >=20 > # BAD >=20 > ?SomeClass|SomeOtherClass > ?SomeOtherClass|SomeClass >=20 > ?string|int > ?int|string >=20 > This would be a perfectly valid and reasonable restriction that makes > sense in every way because it helps to avoid ambiguity. However, > disallowing ?T is not. >=20 > --=20 > Richard "Fleshgrinder" Fussenegger >=20 These last ones (which you describe as "BAD" are anyway disallowed. The separate vote is to remove ?string by string | null as only option. (It basically just preserves the concept of nullability, but reverses = the decision to use a trailing ?. This vote is in order to give those = who prefer only foo | null instead of ?foo a chance to voice their = opinion.) Bob=