Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Marcus Boerger
Hello Hans, Tuesday, February 17, 2004, 10:43:41 PM, you wrote: > Hi- > Cristiano Duarte wrote: >> >>>I still think that interfaces should follow the same behavior as classes >>>(i.e. if you can override in classes you can override in interfaces), >>>but I understand that academically this is w

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Hans Lellelid
Hi- Cristiano Duarte wrote: I still think that interfaces should follow the same behavior as classes (i.e. if you can override in classes you can override in interfaces), but I understand that academically this is wrong. Of course overriding is wrong period, but it's the route you have to take w

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Cristiano Duarte
Hi Hans, On Tue, 17 Feb 2004 15:44:38 -0500, Hans Lellelid wrote: > Ok, I guess that's just how it is in PHP. The only thing I would cling > to is that this behavior is inconsistent with the way classes behave: > i.e. you can override a method in a class and the ($obj instanceof > ParentClass) w

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Hans Lellelid
Hi - Cristiano Duarte wrote: On Tue, 17 Feb 2004 15:34:11 +, Stephane Drouard wrote: Hans, In PHP you are not allowed to explicit overload methods. Ex: class A { function x($a1) {} function x($a1, $a2) {} } The function "x" is already defined and explicit overloading is not

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Cristiano Duarte
On Tue, 17 Feb 2004 15:34:11 +, Stephane Drouard wrote: Hans, In PHP you are not allowed to explicit overload methods. Ex: class A { function x($a1) {} function x($a1, $a2) {} } The function "x" is already defined and explicit overloading is not possible, so the code above w

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Marcus Boerger
Hello Hans, Tuesday, February 17, 2004, 2:59:26 PM, you wrote: > Andi Gutmans wrote: >> It depends what you call different signature. If you are talking about >> default arguments, we should consider allowing those as they don't >> change the isA relationship. However, if you want us to allow

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Ferdinand Beyer
On 17 Feb 2004 at 8:59, Hans Lellelid wrote: > interface IA { > function init(); > function doSomething($arg1,$arg2); > } > > interface IB { > funciton init(); > function doSomething($arg1, $arg2, $arg3, $arg4 = null); > function doSomethingElse($arg1); > } > > class A implements

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Stephane Drouard
== Quote from Hans Lellelid ([EMAIL PROTECTED])'s article > In more traditional PHP this works fine: > > class A { > function init() { ... } > function doSomething($arg1, $arg2) { ... } > } > > class B extends A { > function doSomething($arg1, $arg2, $arg3, $arg4 = null) { ... } > f

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Hans Lellelid
Andi Gutmans wrote: It depends what you call different signature. If you are talking about default arguments, we should consider allowing those as they don't change the isA relationship. However, if you want us to allow inheriting interfaces which truly differ in function prototypes than that

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Andi Gutmans
It depends what you call different signature. If you are talking about default arguments, we should consider allowing those as they don't change the isA relationship. However, if you want us to allow inheriting interfaces which truly differ in function prototypes than that would definitely be

[PHP-DEV] more on interface inheritance issues

2004-02-16 Thread Hans Lellelid
Hi - This issue of inheritance & interfaces persists to give me problems... Perhaps I'm going about this wrong for PHP. Zeev Suraski wrote: You're not supposed to change the signature when you're extending/implementing interfaces. I'll try to see if it's feasible to improve the checks so tha