Hi!

On 9/19/11 2:05 AM, Frédéric Hardy wrote:
What is the utility of abstract method if implementation can not follow
the signature (constraints ?) of the abstract method ?
In this case, abstract methods are totaly useless !
Moreover, i think that it's not compatible with Liskov substitution
principle (http://en.wikipedia.org/wiki/Liskov_substitution_principle).

You misunderstand what LSP means. It does not mean "overriding methods should have same signatures", it means "overriding methods should accept any data that base method accepts". It never says it can not accept any other data. As for your claim that without this restriction abstract methods are useless for you - if you're using them for this, you're already using them wrong. No code should rely on other code failing.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to