Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101401 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74974 invoked from network); 19 Dec 2017 23:07:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2017 23:07:20 -0000 X-Host-Fingerprint: 86.252.5.148 LFbn-1-1184-148.w86-252.abo.wanadoo.fr Received: from [86.252.5.148] ([86.252.5.148:13030] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/49-10479-5AB993A5 for ; Tue, 19 Dec 2017 18:07:19 -0500 To: internals@lists.php.net Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes References: Date: Wed, 20 Dec 2017 00:06:50 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable Message-ID: User-Agent: Opera Mail/1.0 (Win32) X-Posted-By: 86.252.5.148 Subject: Re: [RFC] Mixed Typehint From: bensor987@neuf.fr ("Benoit Schildknecht") Le Tue, 19 Dec 2017 04:34:24 +0100, Michael Moravec = a =C3=A9crit: > Hello internals, > > I'd like to propose and discuss Mixed Typehint RFC for PHP 7.3: > https://wiki.php.net/rfc/mixed-typehint > > The purpose of this RFC is to introduce "mixed" typehint on language = > level > to be used > as a valid typehint. PHP currently forces users to not use any type in= = > case > the > type is mixed/unclear. This makes code inconsistent and less explicit.= = > With > mixed, > it should be easy to eliminate this inconsistency and achieve fully ty= pe > hinted code. > It's a simple alias for the current behavior of no type and is fully > interchangeable. > This is mostly cosmetic change, no BC break to user-land is involved. > > This RFC comes with a rather simple PR: > https://github.com/php/php-src/pull/2603 > > Please let me know what you think or if you find anything unclear. > > Thanks! > Michael Moravec It would be a +1 for me. Typehinting "mixed" tells way more than no = typehinting at all. Because legacy code.