Re: [PHP-DEV] OO Parameter Checking

2008-03-01 Thread Marcus Boerger
Hello Christian, Saturday, March 1, 2008, 1:53:39 PM, you wrote: > Hello Christian, Stanislav, > Friday, February 29, 2008, 6:44:44 PM, you wrote: >> Hi! >>> 1) The current checks are IMHO too strict regarding default values for >>> parameters: An inheriting class can add default values to a p

Re: [PHP-DEV] OO Parameter Checking

2008-03-01 Thread Marcus Boerger
Hello Christian, Stanislav, Friday, February 29, 2008, 6:44:44 PM, you wrote: > Hi! >> 1) The current checks are IMHO too strict regarding default values for >> parameters: An inheriting class can add default values to a parameter >> without breaking the protocol: >> class A { function foo($x) {

Re: [PHP-DEV] OO Parameter Checking

2008-02-29 Thread Stanislav Malyshev
Hi! 1) The current checks are IMHO too strict regarding default values for parameters: An inheriting class can add default values to a parameter without breaking the protocol: class A { function foo($x) { ... } } class B extends A { function foo($x = 42) { ... } } should be allowed. Only if ther

Re: [PHP-DEV] OO Parameter Checking

2008-02-29 Thread Robert Cummings
On Fri, 2008-02-29 at 18:27 +0100, Christian Schneider wrote: > Marcus Boerger wrote: > > you still cannot ignore basic inheritance or reuse rules. Protocols > > have to be respected -> E_FATAL, fix your code. I don't see why THIS protocol should need to be respected when PHP lacks argument sig

[PHP-DEV] OO Parameter Checking

2008-02-29 Thread Christian Schneider
Marcus Boerger wrote: > you still cannot ignore basic inheritance or reuse rules. Protocols > have to be respected -> E_FATAL, fix your code. I have several comments (plus patches) to this: 1) The current checks are IMHO too strict regarding default values for parameters: An inheriting class ca