Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93724 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4559 invoked from network); 2 Jun 2016 17:37:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jun 2016 17:37: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.159 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.159 blu004-omc4s20.hotmail.com Received: from [65.55.111.159] ([65.55.111.159:55011] helo=BLU004-OMC4S20.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 49/86-62101-ADE60575 for ; Thu, 02 Jun 2016 13:37:30 -0400 Received: from BLU436-SMTP14 ([65.55.111.136]) by BLU004-OMC4S20.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Thu, 2 Jun 2016 10:37:26 -0700 X-TMN: [LjM4lBTGvrvxwiQrBHJWs8J5AN/D2jTu] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) In-Reply-To: <0A.C5.62101.1C860575@pb1.pair.com> Date: Thu, 2 Jun 2016 19:37:20 +0200 CC: internals@lists.php.net Content-Transfer-Encoding: quoted-printable References: <0A.C5.62101.1C860575@pb1.pair.com> To: Andrea Faulds X-Mailer: Apple Mail (2.3112) X-OriginalArrivalTime: 02 Jun 2016 17:37:24.0038 (UTC) FILETIME=[6C4BEE60:01D1BCF5] Subject: Re: [PHP-DEV] Re: [RFC] [PRE-VOTE] Union types From: bobwei9@hotmail.com (Bob Weinand) > Am 02.06.2016 um 19:11 schrieb Andrea Faulds : >=20 > Hi Bob, >=20 > Bob Weinand wrote: >> Hey all, >>=20 >> I know, it has been quite some time =E2=80=A6 but it's still well in = time for 7.1. >>=20 >> Time to move on and put Union types to vote soon. [In the next 1-2 = days] >>=20 >> We have done some changes to the RFC to emphasize the appeal of union = types as well as clarified what exactly we will vote on. >>=20 >> If you have more feedback, it's welcome: = https://wiki.php.net/rfc/union_types >=20 > I do wonder if 1-2 days is really sufficient time, given that before = now, the only announced RFC had been substantially less complete. >=20 > That aside, the behaviour the RFC now specifies for how weak typing = interacts with union types is frighteningly complicated. I don't see how = it could be anything other than that, but the new complexity this = introduces to PHP is enough for me to vote against this RFC, even = ignoring my other concerns. >=20 > Thanks. > --=20 > Andrea Faulds > https://ajf.me/ Hey, I think this is more of a presentation problem. As you say, there's not much a better way to do that. It's basically our weak casting rules, just applied to the most lossless = type available. It's out weak casting rules which are so complex; the RFCs combination = is not particularly complex. It needs to cover everything, but it's particularly important for the = trivial cases to be handled here. Would be quite WTF if you could not = pass a float to something accepting int (as one of its types). I'd welcome every suggestion to make the rules look less scary, because = they actually aren't. Bob=