Hi Anthony,
I really like the idea. But I'd prefer the following syntax:
public function __construct(~HttpKernelInterfaceForClientIp $parent) {
$this->parent = $parent;
}
Reasons:
* A passed object does not have to explicitly implement the interface, but
only implicitly ("practically", "more or less"). The tilde conveys that
semantic very well.
* As you mentioned, brackets are (IMO too) close to generics.
Cheers,
Bernhard
--
Bernhard Schussek
Blog: http://webmozarts.com
Twitter: http://twitter.com/webmozart
2013/6/25 Anthony Ferrara <[email protected]>
> 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
>