Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Pierre
On 8/8/06, Adam Maccabee Trachtenberg <[EMAIL PROTECTED]> wrote: On Mon, 7 Aug 2006, Pierre wrote: > > Compromises are fine. Not implementing certain stuff is fine. Violating > > most basic expectations is different. And adding inconsistencies nobody > > can understand is imo wrong. I just feel

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Adam Maccabee Trachtenberg
On Mon, 7 Aug 2006, Pierre wrote: > > Compromises are fine. Not implementing certain stuff is fine. Violating > > most basic expectations is different. And adding inconsistencies nobody > > can understand is imo wrong. I just feel very bad with this movement. > > Nobody can understand? Is it not o

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Marcus Boerger
Hello Richard, strict would meann a new keyword which most likely breaks a bunch of applications. It would be much easier to do: class Foo implements Strict { } and for the methods only stick with 'interface'. best regards marcus Monday, August 7, 2006, 8:29:09 PM, you wrote: > On Mon, Augu

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Richard Lynch
On Mon, August 7, 2006 8:25 am, Jeff Moore wrote: > On Aug 4, 2006, at 3:23 AM, Derick Rethans wrote: > >> - Add a new flag to methods (at the implementation level) that will >> allow to flag them as 'strict' > > Would exposing this flag to the user at method level get a bit verbose > for those w

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Lukas Smith
Jeff Moore wrote: On Aug 4, 2006, at 3:23 AM, Derick Rethans wrote: - Add a new flag to methods (at the implementation level) that will allow to flag them as 'strict' Hello, Would exposing this flag to the user at method level get a bit verbose for those who want to use it? Perhaps a c

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Jeff Moore
On Aug 4, 2006, at 3:23 AM, Derick Rethans wrote: - Add a new flag to methods (at the implementation level) that will allow to flag them as 'strict' Hello, Would exposing this flag to the user at method level get a bit verbose for those who want to use it? Perhaps a class level flag for

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Pierre
On 8/7/06, Jochem Maas <[EMAIL PROTECTED]> wrote: Pierre wrote: > Hello, > > On 8/7/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: > >> > class Foo { >> > public interface function myFoo($x) { echo $x; } // strict >> method signature enforced >> > } >> >> > class Bar extends Foo { >> >

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Jochem Maas
Pierre wrote: > Hello, > > On 8/7/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: > >> > class Foo { >> > public interface function myFoo($x) { echo $x; } // strict >> method signature enforced >> > } >> >> > class Bar extends Foo { >> > public function myFoo() { echo "bar"; } // th

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Pierre
Hello, On 8/7/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: Compromises are fine. Not implementing certain stuff is fine. Violating most basic expectations is different. And adding inconsistencies nobody can understand is imo wrong. I just feel very bad with this movement. Nobody can understa

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Marcus Boerger
Hello Jochem, Monday, August 7, 2006, 12:15:51 PM, you wrote: > Marcus Boerger wrote: >> Hello Pierre, >> >> Monday, August 7, 2006, 11:36:57 AM, you wrote: >> >>> On Mon, 7 Aug 2006 11:16:05 +0200 >>> [EMAIL PROTECTED] (Pierre) wrote: >> > Oh thinking and documenting is forbidden - i

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Marcus Boerger
Hello Zeev, Monday, August 7, 2006, 12:02:29 PM, you wrote: > Marcus, > A few points: > - There's nothing wrong about being lazy, especially as PHP's main > selling point is that it's easy to use (or in other words - also > suitable for people who have better things to do than mess with the l

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Pierre
Hello, On 8/7/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: > class Foo { > public interface function myFoo($x) { echo $x; } // strict method signature enforced > } > class Bar extends Foo { > public function myFoo() { echo "bar"; } // this would be E_FATAL > } > class Qux ex

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Zeev Suraski
Marcus, A few points: - There's nothing wrong about being lazy, especially as PHP's main selling point is that it's easy to use (or in other words - also suitable for people who have better things to do than mess with the language). - I can assure you that there are a hell of a lot more than

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Jochem Maas
Marcus Boerger wrote: > Hello Pierre, > > Monday, August 7, 2006, 11:36:57 AM, you wrote: > >> On Mon, 7 Aug 2006 11:16:05 +0200 >> [EMAIL PROTECTED] (Pierre) wrote: > Oh thinking and documenting is forbidden - i see >>> PHP thinks for me now, and if it is about documenting, then I don

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Pierre
Hello, On 8/7/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: Hello Pierre, Monday, August 7, 2006, 11:36:57 AM, you wrote: > On Mon, 7 Aug 2006 11:16:05 +0200 > [EMAIL PROTECTED] (Pierre) wrote: >> > Oh thinking and documenting is forbidden - i >> > see >> >> PHP thinks for me now, and if it i

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Marcus Boerger
Hello Pierre, Monday, August 7, 2006, 11:36:57 AM, you wrote: > On Mon, 7 Aug 2006 11:16:05 +0200 > [EMAIL PROTECTED] (Pierre) wrote: >> > Oh thinking and documenting is forbidden - i >> > see >> >> PHP thinks for me now, and if it is about documenting, then I don't >> any interfaces and all th

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Pierre
On Mon, 7 Aug 2006 11:16:05 +0200 [EMAIL PROTECTED] (Pierre) wrote: > > Oh thinking and documenting is forbidden - i > > see > > PHP thinks for me now, and if it is about documenting, then I don't > any interfaces and all the other additions, I can document everything. Sorry, I mean I do not _ne

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Pierre
On Mon, 7 Aug 2006 10:14:01 +0200 [EMAIL PROTECTED] (Marcus Boerger) wrote: > Hello Andi, Hello, > Sunday, August 6, 2006, 10:56:18 PM, you wrote: > > > Hey, > > > Coming into this a bit late (took me a while to read the gazillion > > emails on the topic. > > > First of all, I agree that we

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Marcus Boerger
Hello Andi, Sunday, August 6, 2006, 10:56:18 PM, you wrote: > Hey, > Coming into this a bit late (took me a while to read the gazillion emails on > the topic. > First of all, I agree that we can find some middle ground which should make > everyone happy. > I don't think that making interfaces h

RE: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Derick Rethans
On Mon, 7 Aug 2006, Zeev Suraski wrote: > Agreed! Here as well... Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-07 Thread Zeev Suraski
Agreed! Zeev At 23:56 06/08/2006, Andi Gutmans wrote: Hey, Coming into this a bit late (took me a while to read the gazillion emails on the topic. First of all, I agree that we can find some middle ground which should make everyone happy. I don't think that making interfaces have additional s

RE: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-06 Thread Andi Gutmans
Hey, Coming into this a bit late (took me a while to read the gazillion emails on the topic. First of all, I agree that we can find some middle ground which should make everyone happy. I don't think that making interfaces have additional semantics is the way to go though. I personally don't think

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-06 Thread Lukas Smith
Zeev Suraski wrote: It's my list actually, so I'm definitely +1 on that :) Sorry, did not want to take away credit from you Zeev :) regards, Lukas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-06 Thread Zeev Suraski
At 10:49 04/08/2006, Lukas Smith wrote: Derick Rethans wrote: - Add a new flag to methods (at the implementation level) that will allow to flag them as 'strict' - In case such a strict method is improperly overridden - error out (E_ERROR) - In case a non-strict method is improperly overri

RE: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-04 Thread Soenke Ruempler
Hi, Just one question: Is there a real need to break BC in a minor version (5.1 => 5.2 is minor from a PHP users's, at least my POV) ? Can't this be done in 6.0? -soenke -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-04 Thread Derick Rethans
On Thu, 3 Aug 2006, Rasmus Lerdorf wrote: > Pierre wrote: > > > > On 8/3/06, Derick Rethans <[EMAIL PROTECTED]> wrote: > > > > > > In this particular case I think it should be possible to mark > > > certain internal > > > > methods as strict and keep userspace methods loose. > > > > > > But I w

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-04 Thread Lukas Smith
Derick Rethans wrote: - Add a new flag to methods (at the implementation level) that will allow to flag them as 'strict' - In case such a strict method is improperly overridden - error out (E_ERROR) - In case a non-strict method is improperly overridden - emit E_STRICT i am fine with tha

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Jochem Maas
Rasmus Lerdorf wrote: > Pierre wrote: >> Hello, >> >> On 8/3/06, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: >> >>> I'm not all that keen on a new keyword for this. How about using an >>> interface to indicate strictness? Isn't this really what interfaces are >>> all about? >> >> I don't like new k

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Stefan Walk
If "use interfaces" means that i have to write an interface matching every public method in my class if i want that strict mode, and another interface for every inheriting class that adds method, then that is not a solution. That means code duplication ... Regards, Stefan -- PHP Internals - PHP

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Rasmus Lerdorf
Pierre wrote: Hello, On 8/3/06, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: I'm not all that keen on a new keyword for this. How about using an interface to indicate strictness? Isn't this really what interfaces are all about? I don't like new keywords either, but I don't see any alternative

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Sebastian Bergmann
Pierre wrote: > What are you advocating then? Do you have an opinion? ;-) No, at the moment I do not have an opinion on this. -- Sebastian Bergmann http://www.sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 -- PHP Internals

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Pierre
Hello, On 8/3/06, Sebastian Bergmann <[EMAIL PROTECTED]> wrote: Pierre wrote: > I don't like new keywords either, but I don't see any alternative. I > also think that interfaces are what should be used. But it seems that > we are wrong, interfaces do not solve this issue, I'm still unsure > abou

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Sebastian Bergmann
Pierre wrote: > I don't like new keywords either, but I don't see any alternative. I > also think that interfaces are what should be used. But it seems that > we are wrong, interfaces do not solve this issue, I'm still unsure > about the reasons though. Not that I am advocating this, but clas

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Pierre
Hello, On 8/3/06, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: I'm not all that keen on a new keyword for this. How about using an interface to indicate strictness? Isn't this really what interfaces are all about? I don't like new keywords either, but I don't see any alternative. I also think

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Rasmus Lerdorf
Pierre wrote: Hello, On 8/3/06, Derick Rethans <[EMAIL PROTECTED]> wrote: > In this particular case I think it should be possible to mark certain internal > methods as strict and keep userspace methods loose. But I would like to see atleast an e_strict warning of signatures are violated to g

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Ron Korving
I think this is all going way too far. If one wants a "loose" class, you'll just have to suppress errors? That just doesn't sound right. It's like having a feature, but the system telling you "don't use it! it's bad!". If anything, I think E_NOTICE would be much better than E_STRICT, which only

[PHP-DEV] E_STRICT -> E_STRICT + E_DEPRECATED [was: Re: [PHP-DEV] RfC: rethink OO inheritance strictness]

2006-08-03 Thread Sebastian Bergmann
Christian Schneider wrote: > But like you I prefer the E_STRICT version without modifying the > language though. But I'm sharing Lukas' concern about the definition of > E_STRICT: Is it to be changed to E_ERROR at some point? Otherwise > E_NOTICE would be more appropriate IMHO. Not that I am advo

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Richard Quadling
On 03/08/06, Derick Rethans <[EMAIL PROTECTED]> wrote: On Thu, 3 Aug 2006, Richard Quadling wrote: > The issue this brings is toggling E_STRICT on and off at RUNTIME > required? (I suspect that would be a LOT of work). It's only an issue for the first script that is opened... not for includes.

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Jochem Maas
Lukas Smith wrote: > Hi, > > well it seems that the initial vision of E_STRICT to denote future > deprecation is no longer valid. Then again it might have been a > misunderstanding from the beginning as E_DEPRECATED would have been the > more obvious name in that case. I did try to point this out

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Lukas Smith
Derick Rethans wrote: On Thu, 3 Aug 2006, Lukas Smith wrote: I still think that a flag on a per class basis would be the better solution, but I guess I can accept this change. I don't think it is better as it would require somebody (in one of the teams) to modify their source files. Err?

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Christian Schneider
Derick Rethans wrote: Sure, but then that code won't run on older versions of PHP (5.1 f.e.) anymore, so it is not a good solution. The same was true for PPP. But like you I prefer the E_STRICT version without modifying the language though. But I'm sharing Lukas' concern about the definition o

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Derick Rethans
On Thu, 3 Aug 2006, Richard Quadling wrote: > On 03/08/06, Derick Rethans <[EMAIL PROTECTED]> wrote: > > On Thu, 3 Aug 2006, Richard Quadling wrote: > > > > > The issue this brings is toggling E_STRICT on and off at RUNTIME > > > required? (I suspect that would be a LOT of work). > > > > It's only

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Pierre
Hello, On 8/3/06, Derick Rethans <[EMAIL PROTECTED]> wrote: Sure, but then that code won't run on older versions of PHP (5.1 f.e.) anymore, so it is not a good solution. I doubt this is a valid concerns. Our code is actually broken and now. You want more strictness? Require 5.2+ for your appl

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Derick Rethans
On Thu, 3 Aug 2006, Richard Quadling wrote: > The issue this brings is toggling E_STRICT on and off at RUNTIME > required? (I suspect that would be a LOT of work). It's only an issue for the first script that is opened... not for includes. As the parsing E_STRICT things work fine but only *a

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Richard Quadling
On 03/08/06, Derick Rethans <[EMAIL PROTECTED]> wrote: > Err? Code that already works, still works if we make the loose mode the > default. Anyone who writes new classes can make use of a new strict flag > however. Sure, but then that code won't run on older versions of PHP (5.1 f.e.) anymore, s

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Pierre
On 8/3/06, Derick Rethans <[EMAIL PROTECTED]> wrote: On Thu, 3 Aug 2006, Lukas Smith wrote: > I still think that a flag on a per class basis would be the better > solution, but I guess I can accept this change. I don't think it is better as it would require somebody (in one of the teams) to mod

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Derick Rethans
On Thu, 3 Aug 2006, Lukas Smith wrote: > Derick Rethans wrote: > > > On Thu, 3 Aug 2006, Lukas Smith wrote: > > > > > I still think that a flag on a per class basis would be the better > > > solution, but I guess I can accept this change. > > > > I don't think it is better as it would require s

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Derick Rethans
On Thu, 3 Aug 2006, Lukas Smith wrote: > I still think that a flag on a per class basis would be the better > solution, but I guess I can accept this change. I don't think it is better as it would require somebody (in one of the teams) to modify their source files. regards, Derick -- PHP Int

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Lukas Smith
Hi, well it seems that the initial vision of E_STRICT to denote future deprecation is no longer valid. Then again it might have been a misunderstanding from the beginning as E_DEPRECATED would have been the more obvious name in that case. I still think that a flag on a per class basis would

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Pierre
Hello, On Thu, 03 Aug 2006 10:48:38 +0300 [EMAIL PROTECTED] (Zeev Suraski) wrote: > Actually no, what Derick said is what I meant. > > I think emitting an E_STRICT notice on violation of a signature is a > very reasonable compromise between the loose and strict worlds. It's > not scientifica

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Zeev Suraski
At 10:40 03/08/2006, Pierre wrote: Hello, On 8/3/06, Derick Rethans <[EMAIL PROTECTED]> wrote: > In this particular case I think it should be possible to mark certain internal > methods as strict and keep userspace methods loose. But I would like to see atleast an e_strict warning of signatu

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Derick Rethans
On Thu, 3 Aug 2006, Pierre wrote: > Hello, > > On 8/3/06, Derick Rethans <[EMAIL PROTECTED]> wrote: > > > > In this particular case I think it should be possible to mark certain > > > internal > > > methods as strict and keep userspace methods loose. > > > > But I would like to see atleast an e_

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Pierre
Hello, On 8/3/06, Derick Rethans <[EMAIL PROTECTED]> wrote: > In this particular case I think it should be possible to mark certain internal > methods as strict and keep userspace methods loose. But I would like to see atleast an e_strict warning of signatures are violated to give atleast the

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Derick Rethans
On Wed, 2 Aug 2006, Rasmus Lerdorf wrote: > Zeev Suraski wrote: > > I believe the problem is that 10 years ago we introduced what can be > > described as 'loose OO programming', and we're replacing it (instead of > > augmenting it) with strict OO programming. > > Sure, and I agree that we should

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Zeev Suraski
At 01:06 03/08/2006, Marcus Boerger wrote: Hello Richard, Wednesday, August 2, 2006, 11:55:45 PM, you wrote: > On Wed, August 2, 2006 7:32 am, Zeev Suraski wrote: >> I believe the problem is that 10 years ago we introduced what can be >> described as 'loose OO programming', and we're replacing

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-03 Thread Zeev Suraski
At 00:55 03/08/2006, Richard Lynch wrote: On Wed, August 2, 2006 7:32 am, Zeev Suraski wrote: > I believe the problem is that 10 years ago we introduced what can be > described as 'loose OO programming', and we're replacing it (instead > of augmenting it) with strict OO programming. And there ar

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Pierre
On 8/2/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: Hello Pierre, if you cannot read stop blaming me. Nobody blamed you. It was Robert and not Christian. And then read carefully again. You might get the connection. If not i am all sorry. There is no relation between our current disagre

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Richard Lynch
On Wed, August 2, 2006 5:06 pm, Marcus Boerger wrote: > Hello Richard, > > Wednesday, August 2, 2006, 11:55:45 PM, you wrote: > >> On Wed, August 2, 2006 7:32 am, Zeev Suraski wrote: >>> I believe the problem is that 10 years ago we introduced what can >>> be >>> described as 'loose OO programming'

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Marcus Boerger
Hello Richard, Wednesday, August 2, 2006, 11:55:45 PM, you wrote: > On Wed, August 2, 2006 7:32 am, Zeev Suraski wrote: >> I believe the problem is that 10 years ago we introduced what can be >> described as 'loose OO programming', and we're replacing it (instead >> of augmenting it) with strict

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Richard Lynch
On Wed, August 2, 2006 7:32 am, Zeev Suraski wrote: > I believe the problem is that 10 years ago we introduced what can be > described as 'loose OO programming', and we're replacing it (instead > of augmenting it) with strict OO programming. And there are people who actually LIKE the 'loose OO pro

RE: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Matthias Pigulla
> From: Soenke Ruempler [mailto:[EMAIL PROTECTED] > BUT let derived constructors change parameters > a) as constructors are never called from the parent, but > optionally from a child class, it's completely valid IHMO > b) constructors are usally not used in object aggregation / > setters, but

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Marcus Boerger
Hello Pierre, if you cannot read stop blaming me. It was Robert and not Christian. And then read carefully again. You might get the connection. If not i am all sorry. marcus Wednesday, August 2, 2006, 12:41:40 PM, you wrote: > On Wed, 2 Aug 2006 02:42:10 +0200 > [EMAIL PROTECTED] (Marcus Boer

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Lukas Smith
Rasmus Lerdorf wrote: Sure, and I agree that we should find a comfortable middleground, I'd just like to see a little less criticism of Marcus and some more civilized discussion. As far as I am concerned, Marcus' approach of Nobody has criticized Marcus work. I have not heard anyone claim t

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Lukas Smith
Jared Williams wrote: PS: An real-life example from those wo prefer the old behavior would be nice ;-) -soenke Yes, I having a hard time imaging one, other than some quick fix. I'd much rather have some decent refactoring tools. The fact of the matter is you do not need the old behavio

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Pierre
Hi, On 8/2/06, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: Zeev Suraski wrote: > I believe the problem is that 10 years ago we introduced what can be > described as 'loose OO programming', and we're replacing it (instead of > augmenting it) with strict OO programming. Sure, and I agree that we sh

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Richard Lynch
On Wed, August 2, 2006 4:00 am, Stefan Walk wrote: > For the people who have said "I can not understand why this is a bad > thing": > > http://en.wikipedia.org/wiki/Liskov_substitution_principle Unless I'm mis-reading pre/post condition strictures... Given PHP's cheerfully acceptance of additiona

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Zeev Suraski
At 20:06 02/08/2006, Rasmus Lerdorf wrote: Zeev Suraski wrote: I believe the problem is that 10 years ago we introduced what can be described as 'loose OO programming', and we're replacing it (instead of augmenting it) with strict OO programming. Sure, and I agree that we should find a comfor

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Richard Lynch
On Wed, August 2, 2006 5:30 am, Hartmut Holzgraefe wrote: > Ron Korving wrote: > >> So, my suggestion is this: why not support function overloading in >> PHP6, > > because in PHPs dynamicly typed world this would require runtime > checks *on every single function call* as things can't be resolved >

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Richard Lynch
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

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Rasmus Lerdorf
Zeev Suraski wrote: I believe the problem is that 10 years ago we introduced what can be described as 'loose OO programming', and we're replacing it (instead of augmenting it) with strict OO programming. Sure, and I agree that we should find a comfortable middleground, I'd just like to see a

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Zeev Suraski
At 18:22 02/08/2006, Pierre wrote: On 8/2/06, Robert Cummings <[EMAIL PROTECTED]> wrote: On Wed, 2006-08-02 at 16:07 +0200, Derick Rethans wrote: > On Wed, 2 Aug 2006, Zeev Suraski wrote: > > > My recommendation: > > - Add a new flag to methods (at the implementation level) that will allow to

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Todd Ruth
Hooray! Thank you, Zeev! I'd nearly given up hope on ever moving to a new version of php. (Actually, I'm still doomed for using $this in static calls to an unrelated class, but every bit of avoiding fatal errors helps.) Our code may not be OO, but it's definitely php. ;) Thanks, Todd On Wed,

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Pierre
On 8/2/06, Robert Cummings <[EMAIL PROTECTED]> wrote: On Wed, 2006-08-02 at 16:07 +0200, Derick Rethans wrote: > On Wed, 2 Aug 2006, Zeev Suraski wrote: > > > My recommendation: > > - Add a new flag to methods (at the implementation level) that will allow to > > flag them as 'strict' > > Have an

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Robert Cummings
On Wed, 2006-08-02 at 16:07 +0200, Derick Rethans wrote: > On Wed, 2 Aug 2006, Zeev Suraski wrote: > > > My recommendation: > > - Add a new flag to methods (at the implementation level) that will allow to > > flag them as 'strict' > > Have an example of what you mean here? Maybe something like t

RE: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Jared Williams
> PS: An real-life example from those wo prefer the old > behavior would be > nice ;-) > > -soenke Yes, I having a hard time imaging one, other than some quick fix. I'd much rather have some decent refactoring tools. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubs

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Edin Kadribasic
Zeev Suraski wrote: > I believe the problem is that 10 years ago we introduced what can be > described as 'loose OO programming', and we're replacing it (instead > of augmenting it) with strict OO programming. That's exactly the problem. We are giving up the "loose" bit of PHP instead of simply ad

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Derick Rethans
On Wed, 2 Aug 2006, Zeev Suraski wrote: > My recommendation: > - Add a new flag to methods (at the implementation level) that will allow to > flag them as 'strict' Have an example of what you mean here? regards, Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, vis

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Hartmut Holzgraefe
Richard Quadling wrote: >> On 02/08/06, Hartmut Holzgraefe <[EMAIL PROTECTED]> wrote: >> Is function overloading really "an OOP thing"? I think so, I've only ever used it within Delphi, so my POV may be skewed. proving by example? ;) To quote http://www.codeproject.com/soap/RefAndOL.asp "Fo

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Richard Quadling
I suppose it could be argued that if you want parameter overloading, then don't declare any parameters to the method and use func_get_args(). This WOULD give the userland code the appearance of parameter overloading. (I'm sure that this was mentioned). But I remember that there where "issues" with

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Michael Wallner
Zeev Suraski wrote: > My recommendation: > - Add a new flag to methods (at the implementation level) that will allow to > flag them as 'strict' > - In case such a strict method is improperly overridden - error out (E_ERROR) Zeev, ain't your recommendation already covered by interfaces? > - In c

RE: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Soenke Ruempler
Zeev Suraski wrote on Wednesday, August 02, 2006 2:33 PM: > I believe the problem is that 10 years ago we introduced what can be > described as 'loose OO programming', and we're replacing it (instead > of augmenting it) with strict OO programming. Yes - and I personally

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Jochem Maas
Zeev Suraski wrote: ... > > > My recommendation: > - Add a new flag to methods (at the implementation level) that will > allow to flag them as 'strict' > - In case such a strict method is improperly overridden - error out > (E_ERROR) > - In case a non-strict method is improperly overridden - em

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Zeev Suraski
At 10:41 02/08/2006, Derick Rethans wrote: On Tue, 1 Aug 2006, Robert Cummings wrote: > On Tue, 2006-08-01 at 23:41 +0200, Marcus Boerger wrote: > > Hello Michael, > > > > nobody forces you to use OO if you don't like it but it is as it is. And > > It is as it is, but not as it was. PHP4 all

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Zeev Suraski
I believe the problem is that 10 years ago we introduced what can be described as 'loose OO programming', and we're replacing it (instead of augmenting it) with strict OO programming. Zeev At 02:11 02/08/2006, Rasmus Lerdorf wrote: Pierre wrote: On Wed, 02 Aug 2006 00:52:27 +0200 [EMAIL PROT

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Richard Quadling
That was done before, so it could be done again. In principle, there is nothing wrong with refactoring or even rewriting, except time and effort. We have OOP developers wanting OOP things that they've seen working fine in other languages and non-OOP'ers wondering why! As this is a discussion for

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Zeev Suraski
At 15:49 02/08/2006, Derick Rethans wrote: On Wed, 2 Aug 2006, Zeev Suraski wrote: > At 10:41 02/08/2006, Derick Rethans wrote: > > > >Yeah, but PHP 4 didn't have OO support, so that argument doesn't count. > > It sure as hell did. You can hardly call an array with another table with function p

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Hartmut Holzgraefe
Richard Quadling wrote: That was done before, so it could be done again. In principle, there is nothing wrong with refactoring or even rewriting, except time and effort. totally changing the underlying type concept in an incompatible way is not refactoring, and even as a rewrite i'm strongly in

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Derick Rethans
On Wed, 2 Aug 2006, Zeev Suraski wrote: > At 10:41 02/08/2006, Derick Rethans wrote: > > > >Yeah, but PHP 4 didn't have OO support, so that argument doesn't count. > > It sure as hell did. You can hardly call an array with another table with function pointers OO :) regards, Derick -- PHP Int

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Zeev Suraski
At 12:44 02/08/2006, Lukas Smith wrote: Derick Rethans wrote: On Wed, 2 Aug 2006, Lukas Smith wrote: again i feel that people who want to use PHP as a "proper" OO language will definately benefit from a strict mode if they are willing to put in the extra planning. however alienating the user

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Hartmut Holzgraefe
Richard Quadling wrote: This is where PHP's strengths can be seen as a weakness. If parameter overloading is wanted then it would be easier if PHP was not a loosely typed language. it wouldn't bee PHP then anymore, neither from the user experience nor from its internal implementation. This woul

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Richard Quadling
This is where PHP's strengths can be seen as a weakness. If parameter overloading is wanted then it would be easier if PHP was not a loosely typed language. But, just for arguments sake, if E_STRICT was active _and_ type hinting was available for ALL types, then at compile time, you COULD build t

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Hartmut Holzgraefe
Ron Korving wrote: So, my suggestion is this: why not support function overloading in PHP6, because in PHPs dynamicly typed world this would require runtime checks *on every single function call* as things can't be resolved at compile time? -- Hartmut Holzgraefe, Senior Support Engineer

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Hartmut Holzgraefe
Stefan Walk wrote: For the people who have said "I can not understand why this is a bad thing": http://en.wikipedia.org/wiki/Liskov_substitution_principle so it is a bad thing when aiming for substitutability, i lack to see an argument yet for substitutability being a must have in all situati

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Pierre
On Wed, 2 Aug 2006 02:42:10 +0200 [EMAIL PROTECTED] (Marcus Boerger) wrote: > Hello Robert, > > Wednesday, August 2, 2006, 2:32:27 AM, you wrote: > > > To make a better language. Following all the sheep out there just > > makes for more fodder. Just because it's in the books, doesn't make > > it

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Christian Schneider
Lukas Smith wrote: So then the only option is to introduce a "i-dont-want-to-care-about-oo-in-my-classes-mode" for the people who simply don't care. yes .. it should be possible to set this on a per class basis. and children should be able to change the mode. classes in lax mode might also r

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Lukas Smith
Derick Rethans wrote: On Wed, 2 Aug 2006, Lukas Smith wrote: again i feel that people who want to use PHP as a "proper" OO language will definately benefit from a strict mode if they are willing to put in the extra planning. however alienating the userbase for this by making it impossible to k

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Derick Rethans
On Wed, 2 Aug 2006, Lukas Smith wrote: > again i feel that people who want to use PHP as a "proper" OO language will > definately benefit from a strict mode if they are willing to put in the extra > planning. however alienating the userbase for this by making it impossible to > keep the old low pl

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Stefan Walk
For the people who have said "I can not understand why this is a bad thing": http://en.wikipedia.org/wiki/Liskov_substitution_principle Regards, Stefan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Ron Korving
If I might make a suggestion... I see two camps here, one in favor of freedom and others in favor of reliability in inheritance. I think both make good points. Maybe there is a way out that can please both and even another group of people. Maybe, for PHP6, it's an idea to start supporting funct

Re: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Lukas Smith
Derick Rethans wrote: On Tue, 1 Aug 2006, Robert Cummings wrote: On Tue, 2006-08-01 at 23:41 +0200, Marcus Boerger wrote: Hello Michael, nobody forces you to use OO if you don't like it but it is as it is. And It is as it is, but not as it was. PHP4 allowed signature mismatching. Yeah,

  1   2   >