On Nov 24, 2008, at 9:27 PM, Christopher Vogt wrote:

Interfaces are helpful in combination with type hinting, but for people who prefer
duck typing, it is reasonable to not explicitly define them.

It sounds like you are saying that if you prefer duck typing then interfaces have no use.

If this is what you mean, I disagree strongly.

Interfaces are primarily to create a set of methods that define an interface. Then the compiler can enforce implementation of that interface in any class that claims to implement the interface. This is the core utility of interfaces.

Alan

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to