Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92369 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62900 invoked from network); 16 Apr 2016 16:15:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2016 16:15:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=bjorn.x.larsson@telia.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=bjorn.x.larsson@telia.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain telia.com from 81.236.60.154 cause and error) X-PHP-List-Original-Sender: bjorn.x.larsson@telia.com X-Host-Fingerprint: 81.236.60.154 v-smtpout1.han.skanova.net Received: from [81.236.60.154] ([81.236.60.154:38325] helo=v-smtpout1.han.skanova.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/93-32052-11562175 for ; Sat, 16 Apr 2016 12:15:14 -0400 Received: from [192.168.7.7] ([195.198.188.252]) by cmsmtp with SMTP id rSsIaYh8wybs1rSsIacgSx; Sat, 16 Apr 2016 18:15:10 +0200 To: Levi Morrison , Derick Rethans References: Cc: PHP internals Message-ID: <57126511.1010801@telia.com> Date: Sat, 16 Apr 2016 18:15:13 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfAik/nKbVDnAWyItekfhofHUwZzCy5HYMoVL6xSG020TY6berPH/5+nZknQFwazvSycyxp0FeAgOYvyTqzMyGSoJQzi+hkVjrzWql/W6gxK0vEfyMC7t 4auSEcmcVgIFPOESn+LSJeFQhNq39D3cIbBfpzfkr9F7I0mA8aedk8B8mTUwLVBpo7mEmj2CW4GalcKr3PXXBizbaoVnlP8caR0UJdaXRLkMu9JBVaUQRAFi 62Pd77qnSZURH2QtKMCsMQ== Subject: Re: [PHP-DEV] [RFC] Union Types From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) Den 2016-04-14 kl. 16:25, skrev Levi Morrison: > On Thu, Apr 14, 2016 at 3:12 AM, Derick Rethans wrote: >> On Wed, 13 Apr 2016, Levi Morrison wrote: >> >>> As alluded to in an earlier email today[1] I am now moving the Union >>> Types RFC[2] to the discussion phase. The short summary of the RFC is >>> that it permits a type declaration to be one of several enumerated >>> types. For example, this is a potential signature for a multi-type map >>> routine: >>> >>> function map(callable $f, Array | Traversable $iterable); >> I think what I am missing in the RFC is behaviour with scalar (weak) >> typehints, and which type the variable in a class would be converted to. >> Take for example: > This is not missing in the RFC; see the section called Weak Scalar > Types in Open Issues. However, it does not propose a solution. I have > been assured by a few people that it is possible and it is just > something that needs worked out. > Should the discussion phase lead to proposed conversion rules in the RFC for scalar types or is it left for later? Regards //Björn