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

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

 



[snip]
"enforcing a contract" is a lot of maningless gobbledegook. The simple
fact 
is that it is possible to have an interface without ever using the term 
"interface". Nothing extra is added by using the term "interface"
(except 
for effort) so there is absolutely no advantage in doing so. That is why
I 
say that the term "interface" is a waste of effort as absolutely nothng
is 
gained.
[/snip]

What about encapsulation? Also, there is an advantage to interfaces that
has not been mentioned yet, the fact that a class can implement multiple
interfaces (polymorphism). 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.

-- 
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