Re: Reserve even more type hints RFC
| From: | Ángel González | Date: | Wed, 29 Apr 2015 22:49:03 +0000 |
| Subject: | Re: Reserve even more type hints RFC | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86037@lists.php.net to get a copy of this message | ||
On 30/04/15 00:41, Christoph Becker wrote:
Hi everybody! I've noticed that the "Reserve Even More Types in PHP 7" RFC[1] has been moved to "Process and Policy" with the comment "needs no impl". However, the RFC states: | This RFC does not fully reserve them as keywords; it only prohibits | their usage as class, interface and trait names. In my opinion, this has to be enforced by throwing a fatal error ("Cannot use '*' as class name as it is reserved"), whenever one of the reserved identifiers (resource, object, mixed, numeric) is used as class, interface or trait name. Relying on documentation only seems to be insufficient to me. Consider a developer not reading the documentation and facing the issue that his/her code might break with PHP 7.1 (i.e. a minor version). +1If not a fatal, it should be at least a warning. Doc-only keyword reservation won't be noticed.