Re: RFC: Protocol Type Hinting

From: 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 [email protected] to get a copy of this message
On Tue, 25 Jun 2013 19:57:15 +0400, Anthony Ferrara <[email protected]> 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! Anthony
Hey, 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 :)

Thread (50 messages)

« previous php.internals (#67811) next »