Re: [RFC] Mixed Typehint
| From: | Benoit Schildknecht | Date: | Tue, 19 Dec 2017 23:06:50 +0000 |
| Subject: | Re: [RFC] Mixed Typehint | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-101401@lists.php.net to get a copy of this message | ||
Le Tue, 19 Dec 2017 04:34:24 +0100, Michael Moravec <php.net@majkl578.cz> a écrit:
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 type 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 MoravecIt would be a +1 for me. Typehinting "mixed" tells way more than no typehinting at all. Because legacy code.