Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92777 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61187 invoked from network); 26 Apr 2016 13:34:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2016 13:34:01 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 207.46.100.144 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 207.46.100.144 mail-by2on0144.outbound.protection.outlook.com Received: from [207.46.100.144] ([207.46.100.144:44990] helo=na01-by2-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/AE-02401-54E6F175 for ; Tue, 26 Apr 2016 09:33:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=K7ppP84wU9HZ22oDpTc3EEbxADrnHT6ixIGsW0O4yG0=; b=pgqrxqpzOCvSmwdoWK6d+Bo0+rbIUMuNy9o3wHXyGQ1XGMbUwSHCHiMtxc5Ml/UE9yxaq6YNxo+iDYaprvZMuUr4UH0QVCS434EpjAzYgxQWwCSbLE7g4z0ExxF8u258APGWePGcT8es30rwZmL1EIrX38UjoJPJ9UgFn3Q9Tf8= Received: from CY1PR0201MB1786.namprd02.prod.outlook.com (10.163.55.19) by CY1PR0201MB1787.namprd02.prod.outlook.com (10.163.55.20) with Microsoft SMTP Server (TLS) id 15.1.477.8; Tue, 26 Apr 2016 13:33:54 +0000 Received: from CY1PR0201MB1786.namprd02.prod.outlook.com ([10.163.55.19]) by CY1PR0201MB1786.namprd02.prod.outlook.com ([10.163.55.19]) with mapi id 15.01.0477.012; Tue, 26 Apr 2016 13:33:54 +0000 To: Levi Morrison , internals CC: Bob Weinand , Joe Watkins Thread-Topic: [PHP-DEV] [RFC] Patch for Union and Intersection Types Thread-Index: AQHRn0t8HUIa69RiokmK3RsmiQ6ep5+cOtH7 Date: Tue, 26 Apr 2016 13:33:54 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: hotmail.com; dkim=none (message not signed) header.d=none;hotmail.com; dmarc=none action=none header.from=zend.com; x-originating-ip: [92.62.57.172] x-ms-office365-filtering-correlation-id: 8f62c43f-f895-4a35-486b-08d36dd76978 x-microsoft-exchange-diagnostics: 1;CY1PR0201MB1787;5:UHqavIGxrfCvDCC9/vaacCWONWpE/K1WA+jbvfr57kfbK4jSvEf1XDPB4uyCSTZzJw4XAcYMNnfR0i6BrUVFWkcIFMNyEcV/AggdiM7nZZjrTssvGe3TqKVAN5Afn3/y/28gIUxicaR/H8TJk+vGeg==;24:V1mgNn6VoqZJuwdQOsMwjxjdhjPBKyHzoFWIf+j6gy1Hi86BFwRFcbx9f/JdWsotDnCNgiNAIddtW/BH4GfTmoUZ0Dkt6m67iFxwOcgG2Aw=;7:zbxOJX93JMeCdcbirE0NoWpB993h9oROxXFwXiPBUrr5c4Y2ChkOz/HwZFuqUADMMJgPYNlBaZQws2wMsIIqOAWJxkbGYDWydZk+U4UnxD0/e0sjdjIVYIMysKGj/deD/93+/gMYemRyGW3UFeST4NCC9o6IhUoIt/Mxv4puqmfvJss2TH9lXKjNy6xWn3rO x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0201MB1787; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(9101521072)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:CY1PR0201MB1787;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0201MB1787; x-forefront-prvs: 0924C6A0D5 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(54356999)(76176999)(81166005)(50986999)(9686002)(16799955002)(2906002)(5001770100001)(15188155005)(3280700002)(2950100001)(3660700001)(189998001)(2900100001)(87936001)(3900700001)(33656002)(74316001)(10400500002)(229853001)(5008740100001)(76576001)(92566002)(106116001)(77096005)(15975445007)(5003600100002)(99286002)(4326007)(86362001)(11100500001)(5002640100001)(586003)(122556002)(5004730100002)(6116002)(19580405001)(102836003)(1220700001)(19580395003)(1096002)(66066001)(3846002)(556834004);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0201MB1787;H:CY1PR0201MB1786.namprd02.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Apr 2016 13:33:54.2696 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0201MB1787 Subject: [PHP-DEV] [RFC] Patch for Union and Intersection Types From: dmitry@zend.com (Dmitry Stogov) hi Levi, It looks like your "work" on "Nullable Types" RFC was intended to win time = for this patch and block "Nullable Types" again. Actually, you have been blocking it for more than a year :( I'm going to push my own RFC for voting together with "Union Types". https://wiki.php.net/rfc/nullable_return_types At least, it has up to date implementation. We discussed this internally 2-3 weeks ago, and my politeness (or/and stupi= dity) allowed you to pass your version for common discussion. Now I can see your real reason :( Both "Union Types" and "Nullable Types" may make sense, and both should be = voted at the same time. Tomorrow is time to start voting. Right? Thanks. Dmitry. ________________________________________ From: Levi Morrison Sent: Tuesday, April 26, 2016 02:37 To: internals Subject: [PHP-DEV] [RFC] Patch for Union and Intersection Types Internals, Joe Watkins and Bob Weinand have worked out a [proof-of-concept patch for union types][1]. Please go download it and experiment with it. A few things to note: * This patch includes intersection types. However, a type expression must be either a union type or an intersection type; it doesn't support both such as `Array | (Countable & Traversable)`. * This patch adds `null`, `true` and `false` for type declarations. * This patch includes conversion rules for weak types. * It does not have short-hand for unions with null (`?Foo` being `Foo | N= ull`) These features (or omitted ones) are not necessarily what will be voted on. Rather this patch allows us to experiment with these features in code. This experience should be helpful for us to solidify how we actually feel about these features. I especially would like people to try out the conversion rules for scalar types as it has been a point of discussion. [1]: https://github.com/php/php-src/pull/1887 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php