Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Derick Rethans
On Mon, 19 Apr 2004, Sterling Hughes wrote: mo compile errors mo better. But NOT for normal methods! Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Patch for making static method calls work from within xslt

2004-04-20 Thread Christian Stocker
Hi I made a patch for making static php method calls (ala class::method) work from within xslt. (see http://slides.bitflux.ch/phpug2004_1/slide_37.html for some details about this technique) I'm not sure, if I can commit that now in this stage of the release process. Would be great, if it

Re: [PHP-DEV] Patch for making static method calls work from within xslt

2004-04-20 Thread Andi Gutmans
Hi, From looking at the non-whitespace diff I don't quite understand what you changed (except for adding an error message if it's not callable). What am I missing? Andi At 11:00 AM 4/20/2004 +0200, Christian Stocker wrote: Hi I made a patch for making static php method calls (ala

Re: [PHP-DEV] Patch for making static method calls work from within xslt

2004-04-20 Thread Christian Stocker
On 4/20/04 11:05 AM, Andi Gutmans wrote: Hi, From looking at the non-whitespace diff I don't quite understand what you changed (except for adding an error message if it's not callable). What am I missing? the zend_make_callable() was missing. it didn't work without that. chregu Andi At

Re: [PHP-DEV] Patch for making static method calls work from within xslt

2004-04-20 Thread Andi Gutmans
Oh :) I thought that was zend_is_callable(). I'm OK with you commiting this. It's a small one and quite useful. Andi At 11:11 AM 4/20/2004 +0200, Christian Stocker wrote: On 4/20/04 11:05 AM, Andi Gutmans wrote: Hi, From looking at the non-whitespace diff I don't quite understand what you

Re: [PHP-DEV] Patch for making static method calls work from within xslt

2004-04-20 Thread Christian Stocker
On 4/20/04 11:19 AM, Andi Gutmans wrote: Oh :) I thought that was zend_is_callable(). I'm OK with you commiting this. It's a small one and quite useful. Thanks. Comited. chregu Andi At 11:11 AM 4/20/2004 +0200, Christian Stocker wrote: On 4/20/04 11:05 AM, Andi Gutmans wrote: Hi, From

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Stanislav Malyshev
ZSI believe that this behavior is wrong. I believe that classes should ZSnot be allowed to say they implement an interface X, unless they ZSactually implement all of the methods in that interface with methods ZSthat are compatible with its prototypes. I agree. Since interfaces and abstract

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread George Schlossnagle
On Apr 20, 2004, at 3:22 AM, Derick Rethans wrote: On Mon, 19 Apr 2004, Sterling Hughes wrote: mo compile errors mo better. But NOT for normal methods! I agree with Derick. Compile errors for interfaces methods good. Compile errors for normal inherited methods bad. Derick -- PHP Internals -

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Adam Maccabee Trachtenberg
On Tue, 20 Apr 2004, George Schlossnagle wrote: On Apr 20, 2004, at 3:22 AM, Derick Rethans wrote: On Mon, 19 Apr 2004, Sterling Hughes wrote: mo compile errors mo better. But NOT for normal methods! I agree with Derick. Compile errors for interfaces methods good. Compile errors

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Ferdinand Beyer
On 19 Apr 2004 at 20:44, Marcus Boerger wrote: Simply decalre thos methos with an empty signature and use the appropriate functions to handle the arguments? That does not work for foreign/internal interfaces/base classes. Again: Why should we add this strictness? Since PHP is loosely typed,

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Stanislav Malyshev
FBinterface A { FBpublic function doSomething($integer1, $integer2); FB} FB FBinterface B { FB public function doSomething(MyObject $obj); FB} FB FBclass Impl implements A, B FB{ FB// Overloaded - supports both doSomething() interfaces FBpublic function doSomething() FB{ FB

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Sebastian Bergmann
Andi Gutmans wrote: And regular old-style inheritance? If you mean class Foo { public function doSomething($a, $b) {} } class Bar extends Foo { public function doSomething($c, $d, $e) {} } by regular old-style inheritance then no. It would not make sense to

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Ferdinand Beyer
On 20 Apr 2004 at 17:38, Stanislav Malyshev wrote: FBinterface A { FBpublic function doSomething($integer1, $integer2); FB} FB FBinterface B { FB public function doSomething(MyObject $obj); FB} FB FBclass Impl implements A, B FB{ FB// Overloaded - supports both doSomething()

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread George Schlossnagle
On Apr 20, 2004, at 10:48 AM, Ferdinand Beyer wrote: On 20 Apr 2004 at 17:38, Stanislav Malyshev wrote: FBinterface A { FBpublic function doSomething($integer1, $integer2); FB} FB FBinterface B { FB public function doSomething(MyObject $obj); FB} FB FBclass Impl implements A, B FB{ FB

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Stanislav Malyshev
FBImpl guarantees that by implementing interface A. No. It _says_ it implements interface A, but you couldn't know if it indeed does, if we allow your model - maybe that dispatched function call doesn't really accept those arguments? FBWhat if Impl::doSomething() would accept exactly two

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Ferdinand Beyer
On 20 Apr 2004 at 17:55, Stanislav Malyshev wrote: FBImpl guarantees that by implementing interface A. No. It _says_ it implements interface A, but you couldn't know if it indeed does, if we allow your model - maybe that dispatched function call doesn't really accept those arguments?

[PHP-DEV] tidy patch?

2004-04-20 Thread Nuno Lopes
Hello, It seems that nobody applied my patch to tidy (maybe because of the hot discussion). Please review it here: http://news.php.net/article.php?group=php.internalsarticle=9338 It fixes a bug and completes the changes to the StudlyCaps convention. It also frees up some memory, because I've

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Ferdinand Beyer
On 20 Apr 2004 at 11:22, George Schlossnagle wrote: PHP doesn't support this, regardless of you being able to tell them apart, scalar types in PHP are isomorphic. Yes, I know. This is why I am against strict parameter checking. Provided that one has access to the interfaces... I must

Re: [PHP-DEV] tidy patch?

2004-04-20 Thread Andi Gutmans
I asked John to apply it. I prefer him to make sure it's OK (although I looked over it and it looks fine). At 04:31 PM 4/20/2004 +0100, Nuno Lopes wrote: Hello, It seems that nobody applied my patch to tidy (maybe because of the hot discussion). Please review it here:

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread George Schlossnagle
On Apr 20, 2004, at 11:39 AM, Ferdinand Beyer wrote: On 20 Apr 2004 at 11:22, George Schlossnagle wrote: PHP doesn't support this, regardless of you being able to tell them apart, scalar types in PHP are isomorphic. Yes, I know. This is why I am against strict parameter checking. Everything

[PHP-DEV] PHP5 configure options

2004-04-20 Thread Marcus Bointon
I'm building PHP 5RC1 and 4.3.6 on a RH ES3 Linux box. 4.3.6 builds and runs perfectly - the same configure options on PHP 5 produces a build, but gives runtime errors about undefined symbols at PHP startup (e.g. In response to php -v). I then failed to find any docs on differences in compile time

Re: [PHP-DEV] Multi-Method Dispatch in PHP 5.1?

2004-04-20 Thread George Schlossnagle
On Apr 20, 2004, at 2:51 PM, Andrey Hristov wrote: Quoting Sebastian Bergmann [EMAIL PROTECTED]: Since we introduce class type hints in PHP 5.0 I think it would be a good thing [tm] to add multi-method dispatch in PHP 5.1. What I mean by this would be to allow for the following: class