Re: What is the practical use of "abstract" and "interface"?
| From: | Robin Vickery | Date: | Wed, 16 Apr 2008 16:22:40 +0000 |
| Subject: | Re: What is the practical use of "abstract" and "interface"? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-273095@lists.php.net to get a copy of this message | ||
On 16/04/2008, Jay Blanchard <jblanchard@pocket.com> wrote:
> [snip]
> > What about encapsulation?
>
> Interfaces have nothing to do with encapsulation for the smple reason
> that I
> can have encapsulation without using interfaces.
Unique use of logic there.
By similar reasoning; swimming trunks have nothing to do with swimming
for the simple reason that I can swim without trunks.
> You are still missing the fundamental point. There is absolutely
> nothing I can do WITH interfaces that I cannot do WITHOUT them,
> therefore they are redundant.
How about compile-time checking that the interface has been correctly
implemented?
-robin