On Tue, August 1, 2006 4:41 pm, Marcus Boerger wrote: > it is about any signature that has default values or type > hints or > pass by reference info.
Specialized functions, such as constructors, getters/setters, etc, would seem to me to be a Special Case, since PHP automatically calls the parent function and has to pass the args on up the inheritence tree. But I'm still not getting it in the general case of user-defined methods. Why would default values or type hints in the signature of a parent/child interfere with the arglist of a child/parent? The desire for this flexibility isn't about being "lazy" or trying to break some basic OOP theory. Perhaps I'm just so ingrained from 15 years of Lisp hacking that the idea of forced similarities between method parameters is anathema, but there have been innumerable times in the past where I had children with different arglists than their parents for the same method. I realise that PHP has no polymorphism (today, at least) and I can sort of see how one might then assume that all child methods would have the same signature in theory, but, in practice, it seems to me like an artificial restriction with no underlying reason. Consider something like this: class basic_object { function draw_self (){ } } class window extends basic_object { function draw_self (){ } } class themed_window extends window { function draw_self ($color = 'blue'){ } } Is it really that much of stretch of imagination that one might want this -- particularly with a much larger inheritence tree than this silly 3-class example? Where is the harm in this? -- Like Music? http://l-i-e.com/artists.htm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php