On Friday, July 29, 2016 at 5:41:07 AM UTC-4, Andrew Carter wrote:
>
> Type safety, IDE type hinting.
>
> A callable can be anything, an interface guarantees parameter types and, 
> in PHP 7, return types.
>

This dynamic property is an asset, not a liability, which is why there is 
so much confusion as to why we must now encapsulate everything in a wrapper 
object which I believe makes the code less readable.

 

>
> Interfaces also indicate explicit implementation of the standard - rather 
> than implicit implementation on the basis that the passed parameter could 
> be executed.
>

I agree, but in this case being able to supply various different 
combinations as a callable is an awesomething thing.
 

>
> All other reasons I've forgotten as to why interface type hints are a good 
> thing.
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/ef049534-9dd0-4541-8540-b5302635d37e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to