Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107647 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96291 invoked from network); 23 Oct 2019 17:56:44 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 23 Oct 2019 17:56:44 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 5C5572D1FB7 for ; Wed, 23 Oct 2019 08:42:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS14061 192.241.160.0/19 X-Spam-Virus: No Received: from outbound.cloudiway.bcisoft.eu (outbound.cloudiway.bcisoft.eu [192.241.166.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Wed, 23 Oct 2019 08:42:53 -0700 (PDT) Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-bn3nam04lp2050.outbound.protection.outlook.com [104.47.46.50]) by outbound.cloudiway.bcisoft.eu (Postfix) with ESMTPS id A406F600CE; Wed, 23 Oct 2019 11:48:17 -0400 (EDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZedRq7XdUHK83Xy7rgMatOQUVtUwz3MaCMeHc8NbdIIk7+drXl/b47uiVyccSrCmzTrmsXTD4reJK8DNRgeE8pV7gmF347T3vVYf8KWdvm36HaVZEEADpzl9dUAd5inK8a+Czn79sDLTmLWzvtWBGqo6/h7fSXJOuF0mLJQtcEfbFPylU46Qya528uBDt+lS8nFTzT3ui13+BqtUysmoV+ztAf4tp73dvYtCu9cnebaIV6IvQqs7XIVNAG2mHiGnr5r31FXwe3jBumWCqv6JoQqjYkkL5j510OnpMH9Y2/IRlJoYbQkAw6VIbQ76lnF6rP5lx5wjo4mveQCu0pMydg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PWQct30tfjsUuH3rIJaAyulWR480u8pt0a8CkIbNTms=; b=ZySFE0eDsxGk43Hk6soKd9mvx549gy4RhvOwc9yukKOm4VMOF3Umfjqjh9/BeFMHycsJY9u3jSyEWRz6gGCSwuL9MSFH4nggA6MQN5AJ0AaW9hrOg37TvgwzFP5Szb8LAPowoyZ61drau8Ok8r+fSG+rLx7pMAu9qW0jO4jZvfQ9wLmuCc4Jvu0M7qCMF7sXZIE4vUQPS00mhKZRDNg3DO4TZKn29MokZAdA6Z2vJCEpkxpVcwndcJJAAWNDt+mUEskY1Ut+q4Zhi0Qt3LWpJpYpnuS8mutVEJu44rYHGMBiGLuhu5Yznt+z2PBEwqa91GvnKPja3W8FAfau/5g1nQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=zend.com; dmarc=pass action=none header.from=zend.com; dkim=pass header.d=zend.com; arc=none Received: from MN2PR02MB5775.namprd02.prod.outlook.com (20.179.98.90) by MN2PR02MB6653.namprd02.prod.outlook.com (52.135.51.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.22; Wed, 23 Oct 2019 15:42:50 +0000 Received: from MN2PR02MB5775.namprd02.prod.outlook.com ([fe80::d585:d4b8:a154:83ca]) by MN2PR02MB5775.namprd02.prod.outlook.com ([fe80::d585:d4b8:a154:83ca%6]) with mapi id 15.20.2347.029; Wed, 23 Oct 2019 15:42:50 +0000 To: Nikita Popov , PHP internals Thread-Topic: [PHP-DEV] Re: [RFC] Union Types v2 Thread-Index: AQHViLwyaEvmMSOYQkSvsPkH2vQSl6dmmFE8gAGgjCI= Date: Wed, 23 Oct 2019 15:42:49 +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: spf=none (sender IP is ) smtp.mailfrom=dmitry@zend.com; x-originating-ip: [212.232.72.197] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 89960a0b-6aaf-4a14-afbf-08d757cfa908 x-ms-traffictypediagnostic: MN2PR02MB6653: x-ms-exchange-purlcount: 5 x-microsoft-antispam-prvs: cloudiway500: noi$yRiver10 x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 019919A9E4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39850400004)(136003)(366004)(346002)(376002)(396003)(199004)(189003)(105004)(74316002)(6436002)(52536014)(7736002)(76116006)(91956017)(6246003)(8676002)(11346002)(476003)(446003)(86362001)(478600001)(6506007)(7696005)(53546011)(102836004)(966005)(561944003)(14454004)(25786009)(76176011)(66476007)(26005)(99286004)(66446008)(64756008)(186003)(66946007)(66556008)(5660300002)(33656002)(19627405001)(3846002)(6116002)(66066001)(81166006)(81156014)(110136005)(606006)(8936002)(316002)(71200400001)(71190400001)(14444005)(5024004)(256004)(229853002)(54896002)(6306002)(486006)(2906002)(55016002)(9686003)(236005);DIR:OUT;SFP:1102;SCL:1;SRVR:MN2PR02MB6653;H:MN2PR02MB5775.namprd02.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7LOL4jaIIOvPTPCmOTu4YFvIZlGFbPDE80wkPnYVGrFUXKS3UDDJTHNQ7yXxp2PFOSDfNeLegjdBmiM0Nxknk0LKucddRkErQSLJKXgu4wtvrRW5xjQ47oTBnbgiaVnslPWgO6xZPZoLxCdRE7vohjp/fMpYxvGuDkv/9oc7/Tlnki2XwC5/hLwj9XyVX0egdlLC/npLMPblrFYFYoyIUmW+w+TkAlBqx/sbZVX5is2zccD+wwsKDcDhbto6xUUlukycemGqxoiWpCImh9b3y5Q20ZUHUT7ds6nxioIXW401e5YYt7mQVRe/nDHQxqtW095YDoWdBaujPYTuKsfOcXzIOHetwf0D2SoxBYTBbByAz/DV4l2qFodkxqns9GUoaX/GXTNqsokzHCTu/tHsv3UQXa48WSCO45f3BUUtQdTAKlaNuM3IXKroZZXVnZA0R3XmMnvO/gw3SQ4Z3x+TRBq60ofKhPdU/ukrcmtv6EM= x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_MN2PR02MB577594376F687FC7C789B689BF6B0MN2PR02MB5775namp_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89960a0b-6aaf-4a14-afbf-08d757cfa908 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2019 15:42:49.7122 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: k760Jk2dS3EwOwu0aPN0x1tiExYns4kb/ZuEsHc4zETvJfXun6jg4IazU7LtG9o6hFHYGUf9zvB7w6irRaPe0HNnq6ZKfqRZVfiD4bBqodo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB6653 X-Envelope-From: Subject: Re: [PHP-DEV] Re: [RFC] Union Types v2 From: dmitry@zend.com (Dmitry Stogov) --_000_MN2PR02MB577594376F687FC7C789B689BF6B0MN2PR02MB5775namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Nikita, I checked the Union Type implementation, and it more or less good. I mean, = it implements the RFC in almost the best way. However, as I don't like the RFC itself. Especially, unions of multiple cla= sses and interference with type variance, I'll vote against this. Actually, I think PHP already took wrong direction implementing "typed refe= rences" and "type variance". Introducing more "typing", we suggest using it, but this "typing" comes wit= h a huge cost of run-time checks. From 10% (scalar type hint of argument) to 3 times (typed reference assignm= ent) performance degradation. Anyone may rerun my benchmarks https://gist.github.com/dstogov/fb32023e8dd5= 5e58312ae0e5029556a9 Thanks. Dmitry. ________________________________ From: Dmitry Stogov Sent: Tuesday, October 22, 2019 15:38 To: Nikita Popov ; PHP internals Subject: Re: [PHP-DEV] Re: [RFC] Union Types v2 Hi Nikita, Can you please give me one/two days, before starting the voting, for implem= entation review (at least until October 25), Thanks. Dmitry. ________________________________ From: Nikita Popov Sent: Tuesday, October 22, 2019 12:36 To: PHP internals Subject: [PHP-DEV] Re: [RFC] Union Types v2 On Wed, Sep 4, 2019 at 10:26 AM Nikita Popov wrote: > Hi internals, > > I'd like to start the discussion on union types again, with a new proposa= l: > > Pull Request: https://github.com/php/php-rfcs/pull/1 > Rendered Proposal: > https://github.com/nikic/php-rfcs/blob/union-types/rfcs/0000-union-types-= v2.md > > As an experiment, I'm submitting this RFC as a GitHub pull request, to > evaluate whether this might be a better medium for RFC proposals in the > future. It would be great if we could keep the discussion to the GitHub > pull request for the purpose of this experiment (keep in mind that you ca= n > also create comments on specific lines in the proposal, not just the > overall discussion thread!) Of course, you can also reply to this mail > instead. The final vote will be held in the wiki as usual. > > Relatively to the previous proposal by Bob&Levi ( > https://wiki.php.net/rfc/union_types), I think the main differences in > this proposal are: > * Updated to specify interaction with new language features, like full > variance and property types. > * Updated for the use of the ?Type syntax rather than the Type|null > syntax. > * Only supports "false" as a pseudo-type, not "true". > * Slightly simplified semantics for the coercive typing mode. > > Regards, > Nikita > An implementation of this proposal is now available at https://github.com/php/php-src/pull/4838. As the implementation didn't turn up any new issues, I think it's time to move this RFC forward to voting. Nikita CAUTION: This email originated from outside of the organization. Do not cli= ck on links or open attachments unless you recognize the sender and know th= e content is safe. --_000_MN2PR02MB577594376F687FC7C789B689BF6B0MN2PR02MB5775namp_--