Re: RFC: Protocol Type Hinting
| From: | Nikita Nefedov | Date: | Tue, 25 Jun 2013 16:15:01 +0000 |
| Subject: | Re: RFC: Protocol Type Hinting | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-67811@lists.php.net to get a copy of this message | ||
On Tue, 25 Jun 2013 19:57:15 +0400, Anthony Ferrara <ircmaxell@gmail.com> wrote:
Hey all, I want to throw out this draft RFC to get the concept floating around and get feedback early. https://wiki.php.net/rfc/protocol_type_hinting There are still open questions, and a more complete (and cleaner) implementation will be needed before officially proposing it, but I wanted to get the concept out as soon as possible. What do you think? Thanks! AnthonyHey, That's great, just great, I have no more words :3 By looking at the diff I see it will only work for type-hints in functions/methods. Could we also see something like "$var instanceof <ProtoInterface>"? I fear it can't be done this way because of parser limitations, but I believe this feature would be as useful as type-hinting in functions. And again, that's great :)