RE: What is the practical use of "abstract" and "interface"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
> What about encapsulation?

Interfaces have nothing to do with encapsulation for the smple reason
that I
can have encapsulation without using interfaces.

> Also, there is an advantage to 
> interfaces that has not been mentioned yet, the fact that a 
> class can implement multiple interfaces (polymorphism).

Interfaces have nothing to do with polymorphism for the smple reason
that I
can have polymorphism without using interfaces.

> And 
> yes, I know that I can extend by inheritance to create 
> polymorphism too, but what is the most efficient method? It 
> depends on the application.
> 
> Like anything else interfaces are a tool and there may be 
> multiple tools that can accomplish the same job (i.e. table 
> saw, band saw, hand saw). Pick the one that is right for you.

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.
[/snip]

I never said that they were not redundant, I acknowledged that they
were. I you can do without them or choose to do without them then that
totally up to you.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux